File tree Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Original file line number Diff line number Diff line change 1111
1212permissions :
1313 contents : read
14+ pull-requests : write
1415
1516jobs :
1617 build :
@@ -23,19 +24,42 @@ jobs:
2324 uses : actions/setup-python@v3
2425 with :
2526 python-version : " 3.12"
27+
2628 - name : Install dependencies
2729 run : |
2830 python -m pip install --upgrade pip
2931 pip install flake8 pytest
3032 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3133 pip install -e .
34+
3235 - name : Lint with flake8
3336 run : |
34- # Run flake8 using the .flake8 config file
3537 flake8
36- - name : Run pytest under coverage
38+
39+ # run pytest under coverage and write results to an xml file
40+ - name : Run pytest
3741 run : |
3842 coverage run -m pytest
43+ coverage xml
44+
45+ # process coverage report into markdown format
3946 - name : Generate coverage report
40- run : |
41- coverage report -m
47+ uses : irongut/CodeCoverageSummary@v1.3.0
48+ with :
49+ filename : coverage.xml
50+ badge : true
51+ fail_below_min : true
52+ format : markdown
53+ hide_branch_rate : false
54+ hide_complexity : true
55+ indicators : true
56+ output : both
57+ thresholds : ' 70 90'
58+
59+ # post PR comment with code coverage information
60+ - name : Add Coverage PR Comment
61+ uses : marocchino/sticky-pull-request-comment@v2
62+ if : github.event_name == 'pull_request'
63+ with :
64+ recreate : true
65+ path : code-coverage-results.md
You can’t perform that action at this time.
0 commit comments