File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 pull_request :
1010 branches : [ "master" ]
1111
12+ env :
13+ PROJECT_NAME : diff_classifier
14+
1215jobs :
1316 build :
1417
2730 - name : Install dependencies
2831 run : |
2932 python -m pip install --upgrade pip
30- python -m pip install flake8 pytest coverage
33+ python -m pip install flake8 pytest pytest-cov coverage
3134 pip install -e .
3235 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3336 - name : Lint with flake8
3841 flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3942 - name : Test with pytest and coverage
4043 run : |
41- coverage run -m pytest
42- coverage report -m
43- coverage report -m --fail-under=50 --skip-covered
44- COVERAGE_PERCENT=$(coverage report -m --skip-covered | awk '/TOTAL/ { print $4 }' | sed 's/%$//' | awk '{ printf "%d\n", $1 }')
45- echo "COVERAGE_PERCENT=${COVERAGE_PERCENT}" >> $GITHUB_ENV
44+ pytest -vvv -cov=${{ env.PROJECT_NAME }} --cov-report=xml --cov-report=term diff_classifier/tests/
4645
4746 - name : Save coverage report as an artifact
4847 uses : actions/upload-artifact@v2
You can’t perform that action at this time.
0 commit comments