File tree Expand file tree Collapse file tree 3 files changed +86
-86
lines changed Expand file tree Collapse file tree 3 files changed +86
-86
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ workflow_run :
5+ workflows : [Test]
6+ branches : [main]
7+ types : [completed]
8+
9+ jobs :
10+ release :
11+ name : Publish Release
12+ concurrency : release
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v3
16+ with :
17+ token : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
18+ fetch-depth : 0
19+
20+ - name : Set up Python 3.11
21+ uses : actions/setup-python@v4
22+ with :
23+ python-version : " 3.11"
24+
25+ - name : Install Dependencies
26+ run : |
27+ python -m pip install --upgrade pip
28+ # pipenv-setup requires downgraded vistir: https://github.com/Madoshakalaka/pipenv-setup/issues/138
29+ python -m pip install python-semantic-release~=7.33 pipenv-setup[black]==3.2.0 vistir==0.6.1
30+
31+ - name : Setup Git
32+ run : |
33+ git config --local user.name github-actions
34+ git config --local user.email [email protected] 35+
36+ - name : Sync Setup Dependencies
37+ run : |
38+ pipenv-setup sync
39+ git add setup.py
40+
41+ # Only commit and push if there are differences.
42+ if ! git diff --staged --quiet; then
43+ git commit -m "chore[setup]: sync dependencies"
44+ git push
45+ fi
46+
47+ - name : Publish Semantic Release
48+ env :
49+ GH_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
50+ run : semantic-release publish --verbosity=INFO
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on : push
4+
5+ jobs :
6+ test :
7+ if : github.event.commits[0].author.name != 'github-actions'
8+ name : Test Code
9+ runs-on : ubuntu-latest
10+ strategy :
11+ fail-fast : false
12+ matrix :
13+ python-version : ["3.11"]
14+ steps :
15+ - uses : actions/checkout@v3
16+
17+ - name : Set up Python ${{ matrix.python-version }}
18+ uses : actions/setup-python@v4
19+ with :
20+ python-version : ${{ matrix.python-version }}
21+
22+ - name : Install Python Packages
23+ run : |
24+ python -m pip install --upgrade pip
25+ python -m pip install pipenv
26+ pipenv install --dev
27+
28+ - name : Check Code Format
29+ run : if ! pipenv run black --check .; then exit 1; fi
30+
31+ - name : Check Migrations
32+ run : pipenv run python manage.py makemigrations --check --dry-run
33+
34+ # TODO: assert code coverage target.
35+ - name : Test Code Units
36+ run : pipenv run pytest
You can’t perform that action at this time.
0 commit comments