-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from freezingsaddles/add-ci
Add GitHub Actions CI
- Loading branch information
Showing
18 changed files
with
143 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[flake8] | ||
# Thanks https://www.reddit.com/r/learnpython/comments/rr6y69/comment/hqeqt68/?utm_source=share&utm_medium=web2x&context=3 | ||
ignore = E203, W503, E501 | ||
|
||
max-line-length = 88 | ||
max-complexity = 39 | ||
extend-ignore = E203 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Build and Deploy Latest | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
|
||
build: | ||
uses: freezingsaddles/freezing-web/.github/workflows/[email protected] | ||
concurrency: build-deploy-and-test | ||
with: | ||
tag: latest | ||
repo: freezing-nq | ||
secrets: inherit | ||
|
||
deploy: | ||
concurrency: build-deploy-and-test | ||
needs: build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
|
||
- name: install | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
key: ${{ secrets.KEY }} | ||
port: ${{ secrets.PORT }} | ||
passphrase: ${{ secrets.PASSPHRASE }} | ||
script: | | ||
set -euo pipefail | ||
cd /opt/compose | ||
docker-compose pull freezing-nq | ||
docker-compose up -d freezing-nq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: Build Tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
uses: freezingsaddles/freezing-web/.github/workflows/[email protected] | ||
with: | ||
tag: ${{ github.ref_name }} | ||
repo: freezing-nq | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: Build | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
build: | ||
uses: freezingsaddles/freezing-web/.github/workflows/[email protected] | ||
with: | ||
tag: latest-actions-build | ||
repo: freezing-nq | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: Lint | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
|
||
# Thanks https://black.readthedocs.io/en/stable/integrations/github_actions.html | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Python environment | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: black Lint | ||
uses: psf/[email protected] | ||
- name: isort Lint | ||
uses: isort/isort-action@v1 | ||
with: | ||
requirements-files: "requirements.txt requirements-test.txt" | ||
- name: flake8 Lint | ||
uses: py-actions/flake8@v2 | ||
# There are too many errors to start with to fail on this | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
.* | ||
*.pyc | ||
*.egg-info | ||
/env | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[tool.isort] | ||
profile = "black" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
black==19.10b0 | ||
flake8==3.7.9 | ||
pur==5.3.0 | ||
black==24.3.0 | ||
flake8==7.0.0 | ||
isort==5.13.2 | ||
pur==7.3.1 | ||
pytest==3.3.2 | ||
pytest-mock==1.6.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters