File tree Expand file tree Collapse file tree 2 files changed +36
-4
lines changed
Expand file tree Collapse file tree 2 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,13 @@ jobs:
1616 - name : Install dependencies
1717 run : |
1818 python -m pip install --upgrade pip
19- pip install -r requirements.txt && pip install coveralls flake8
19+ pip install -r requirements.txt && pip install flake8 pytest pytest-cov pytest-django
2020 - name : Lint with flake8
2121 run : |
22- flake8 --exclude "*/migrations/" devel main mirrors news packages releng templates todolists visualize *.py
22+ make lint
2323 - name : Run collectstatic
2424 run : |
25- python manage.py collectstatic --noinput
25+ make collectstatic
2626 - name : Run tests
2727 run : |
28- coverage run --rcfile .coveragerc manage.py test
28+ make coverage
Original file line number Diff line number Diff line change 1+ PYTHON> =python
2+ PYTEST? =pytest
3+ PYTEST_OPTIONS+ =
4+ PYTEST_INPUT? =.
5+ PYTEST_COVERAGE_OPTIONS+=--cov-report =term-missing --cov-report=html:htmlcov --cov=.
6+ PYTEST_PDB? =0
7+ PYTEST_PDB_OPTIONS? =--pdb --pdbcls=IPython.terminal.debugger:TerminalPdb
8+
9+
10+ ifeq (${PYTEST_PDB},1)
11+ PYTEST_OPTIONS+ = ${PYTEST_PDB_OPTIONS}
12+ else
13+ test-pdb : PYTEST_OPTIONS+= ${PYTEST_PDB_OPTIONS}
14+ endif
15+ test-pdb : test
16+
17+
18+ .PHONY : test lint coverage
19+
20+ lint :
21+ flake8 --extend-exclude " */migrations/,local_settings.py" devel main mirrors news packages releng templates todolists visualize * .py
22+
23+ collectstatic :
24+ python manage.py collectstatic --noinput
25+
26+ test : test-py
27+
28+ test-py coverage :
29+ DJANGO_SETTINGS_MODULE=settings ${PYTEST} ${PYTEST_OPTIONS} ${PYTEST_COVERAGE_OPTIONS} ${PYTEST_INPUT}
30+
31+ open-coverage : coverage
32+ ${BROWSER} htmlcov/index.html
You can’t perform that action at this time.
0 commit comments