File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed
Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change 11name : Checks
22on : [push]
33
4+ permissions :
5+ contents : write
6+
47jobs :
58 test-lint :
69 runs-on : ubuntu-24.04
10+
711 steps :
812 - uses : actions/checkout@v4
913
14+ - name : Set up Python for formatting
15+ uses : actions/setup-python@v5
16+ with :
17+ python-version : ' 3.11'
18+
19+ - name : Auto-format (black + isort)
20+ run : |
21+ pip install --upgrade pip
22+ pip install black isort
23+ isort backend/app
24+ black backend/app
25+
26+ - name : Auto-commit formatted files
27+ uses : stefanzweifel/git-auto-commit-action@v5
28+ with :
29+ commit_message : " ci(fmt): black+isort [skip ci]"
30+ file_pattern : backend/**/*.py
31+
1032 - name : Create backend .env for CI
1133 env :
1234 DJANGO_SECRET_KEY : ${{ secrets.DJANGO_SECRET_KEY }}
3355 - name : Test
3456 run : docker compose run --rm backend sh -lc "/py/bin/python app/manage.py test -v 2"
3557
36- - name : Auto-format (Black + isort)
37- run : docker compose run --rm backend sh -lc "/py/bin/isort app && /py/bin/black app"
38-
39-
4058 - name : Lint
4159 run : docker compose run --rm backend sh -lc "/py/bin/flake8"
4260
You can’t perform that action at this time.
0 commit comments