We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0a807b commit 7114601Copy full SHA for 7114601
1 file changed
.github/workflows/unit-test.yml
@@ -35,4 +35,22 @@ jobs:
35
36
- name: 🧪 Run tests with coverage
37
run: |
38
- poetry run pytest --cov=pytest_reporter_plus tests/unit/ --cov-fail-under=17
+ poetry run pytest --cov=pytest_reporter_plus tests/unit/ --cov-fail-under=21 --cov-report=term --cov-report=xml
39
+
40
+ - name: 📊 Extract coverage percentage
41
+ if: github.event_name == 'pull_request'
42
+ run: |
43
+ COVERAGE=$(coverage report | grep TOTAL | awk '{print $4}')
44
+ echo "Coverage is $COVERAGE"
45
+ echo "COVERAGE=$COVERAGE" >> $GITHUB_ENV
46
47
+ - name: 💬 Comment coverage on PR
48
49
+ uses: marocchino/sticky-pull-request-comment@v2
50
+ with:
51
+ message: |
52
+ 🧪 **Test Coverage**
53
+ ```
54
+ ${{ env.COVERAGE }}
55
56
0 commit comments