File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will install dependencies, create coverage tests and run Pytest Coverage Comment
2+ # For more information see: https://github.com/MishaKav/pytest-coverage-comment/
3+ name : pytest-coverage-comment
4+ on :
5+ pull_request :
6+ branches :
7+ - ' *'
8+
9+ # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
10+ # `contents` is for permission to the contents of the repository.
11+ # `pull-requests` is for permission to pull request
12+ permissions :
13+ contents : write
14+ checks : write
15+ pull-requests : write
16+
17+ jobs :
18+ build :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/checkout@v3
22+ with :
23+ fetch-depth : 0
24+
25+ - name : Set up PDM
26+ uses : pdm-project/setup-pdm@v4
27+
28+ - name : Install dependencies
29+ run : |
30+ pdm install
31+
32+ - name : Build coverage file
33+ run : |
34+ pdm run pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=app tests/ | tee pytest-coverage.txt
35+
36+ - name : Pytest coverage comment
37+ uses : MishaKav/pytest-coverage-comment@main
38+ with :
39+ pytest-coverage-path : ./pytest-coverage.txt
40+ junitxml-path : ./pytest.xml
You can’t perform that action at this time.
0 commit comments