File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ name: Test Workflow with Coverage - Code-Gen
22permissions :
33 contents : read
44 actions : read
5+ pull-requests : write
56on :
67 push :
78 branches :
@@ -112,10 +113,22 @@ jobs:
112113 if : env.skip_backend_tests == 'false'
113114 run : |
114115 cd src
115- pytest tests/backend --cov=backend --cov-report=term-missing --cov-report=xml --cov-fail-under=80
116+ pytest tests/backend --cov=backend --cov-report=term-missing --cov-report=xml --cov-fail-under=80 --junitxml=pytest.xml
116117
117118
118119
120+ - name : Pytest Coverage Comment
121+ if : |
122+ always() &&
123+ github.event_name == 'pull_request' &&
124+ github.event.pull_request.head.repo.fork == false &&
125+ env.skip_backend_tests == 'false'
126+ uses : MishaKav/pytest-coverage-comment@26f986d2599c288bb62f623d29c2da98609e9cd4 # v1.6.0
127+ with :
128+ pytest-xml-coverage-path : src/coverage.xml
129+ junitxml-path : src/pytest.xml
130+ report-only-changed-files : true
131+
119132 - name : Skip Backend Tests
120133 if : env.skip_backend_tests == 'true'
121134 run : |
You can’t perform that action at this time.
0 commit comments