File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,21 +15,32 @@ jobs:
1515
1616 steps :
1717 - uses : actions/checkout@v2
18+
1819 - name : Set up Python ${{ matrix.python-version }}
1920 uses : actions/setup-python@v2
2021 with :
2122 python-version : ${{ matrix.python-version }}
23+
2224 - name : Install dependencies
2325 run : |
2426 python -m pip install --upgrade pip
25- pip install flake8 pytest
27+ pip install flake8 pytest pytest-cov
2628 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
29+
2730 - name : Lint with flake8
2831 run : |
2932 # stop the build if there are Python syntax errors or undefined names
3033 flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3134 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3235 flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
33- - name : Test with pytest
36+
37+ - name : Test with pytest and generate coverage report
3438 run : |
35- pytest
39+ pytest --cov --cov-report=xml
40+
41+ - name : Upload coverage to Codecov
42+ uses : codecov/codecov-action@v1
43+ with :
44+ file : ./coverage.xml
45+ flags : unittests
46+ env_vars : OS,PYTHON
Original file line number Diff line number Diff line change 1+ # The files aren't interesting for the unit tests run in CI
2+ ignore :
3+ - " bugzilla/_backendrest.py"
4+ - " bugzilla/_backendxmlrpc.py"
You can’t perform that action at this time.
0 commit comments