File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 - ' src/**/pyproject.toml'
3636 - ' .github/workflows/test.yml'
3737
38+ permissions :
39+ contents : read
40+ actions : read
41+ pull-requests : write
42+
3843jobs :
3944 test :
4045 runs-on : ubuntu-latest
7176 run : |
7277 # Run test_app.py first (isolation required)
7378 python -m pytest src/tests/backend/test_app.py --cov=src/backend --cov-config=.coveragerc -q
74-
79+
7580 # Run remaining backend tests with coverage append
76- python -m pytest src/tests/backend --cov=src/backend --cov-append --cov-report=term --cov-report=xml --cov-config=.coveragerc --ignore=src/tests/backend/test_app.py
81+ python -m pytest src/tests/backend --cov=src/backend --cov-append --cov-report=term --cov-report=xml --junitxml=pytest.xml -- cov-config=.coveragerc --ignore=src/tests/backend/test_app.py
7782
7883 - name : Check coverage threshold
7984 if : env.skip_tests == 'false'
9196 exit 1
9297 fi
9398
99+ - name : Pytest Coverage Comment
100+ if : |
101+ always() &&
102+ github.event_name == 'pull_request' &&
103+ github.event.pull_request.head.repo.fork == false &&
104+ env.skip_tests == 'false'
105+ uses : MishaKav/pytest-coverage-comment@26f986d2599c288bb62f623d29c2da98609e9cd4 # v1.6.0
106+ with :
107+ pytest-xml-coverage-path : coverage.xml
108+ junitxml-path : pytest.xml
109+ report-only-changed-files : true
110+
94111 - name : Skip coverage report if no tests
95112 if : env.skip_tests == 'true'
96113 run : |
97- echo "Skipping coverage report because no tests were found."
114+ echo "Skipping coverage report because no tests were found."
You can’t perform that action at this time.
0 commit comments