File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - main
7- - demo-v4
87 - dev-v4
98 paths :
109 - ' src/backend/**/*.py'
2322 - synchronize
2423 branches :
2524 - main
26- - demo-v4
2725 - dev-v4
2826 paths :
2927 - ' src/backend/**/*.py'
3533 - ' src/**/pyproject.toml'
3634 - ' .github/workflows/test.yml'
3735
36+ permissions :
37+ contents : read
38+ actions : read
39+ pull-requests : write
40+
3841jobs :
3942 test :
4043 runs-on : ubuntu-latest
7174 run : |
7275 # Run test_app.py first (isolation required)
7376 python -m pytest src/tests/backend/test_app.py --cov=src/backend --cov-config=.coveragerc -q
74-
77+
7578 # 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
79+ 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
7780
7881 - name : Check coverage threshold
7982 if : env.skip_tests == 'false'
9194 exit 1
9295 fi
9396
97+ - name : Pytest Coverage Comment
98+ if : |
99+ always() &&
100+ github.event_name == 'pull_request' &&
101+ github.event.pull_request.head.repo.fork == false &&
102+ env.skip_tests == 'false'
103+ uses : MishaKav/pytest-coverage-comment@26f986d2599c288bb62f623d29c2da98609e9cd4 # v1.6.0
104+ with :
105+ pytest-xml-coverage-path : coverage.xml
106+ junitxml-path : pytest.xml
107+ report-only-changed-files : true
108+
94109 - name : Skip coverage report if no tests
95110 if : env.skip_tests == 'true'
96111 run : |
97- echo "Skipping coverage report because no tests were found."
112+ echo "Skipping coverage report because no tests were found."
You can’t perform that action at this time.
0 commit comments