We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14c536a commit ebf8db5Copy full SHA for ebf8db5
1 file changed
.github/workflows/coverage.yaml
@@ -8,7 +8,7 @@ jobs:
8
coverage:
9
runs-on: ubuntu-latest
10
steps:
11
- - uses: actions/checkout@v5
+ - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
12
with:
13
persist-credentials: false
14
@@ -22,4 +22,11 @@ jobs:
22
run: composer install --no-interaction --prefer-dist
23
24
- name: Run tests with coverage
25
- run: vendor/bin/phpunit --coverage-text --min=100
+ run: |
26
+ vendor/bin/phpunit --coverage-clover coverage.xml
27
+ LINE_RATE=$(php -r '$x = simplexml_load_file("coverage.xml"); $m = $x->project->metrics; $pct = round((int)$m["coveredstatements"] / (int)$m["statements"] * 100, 2); echo $pct;')
28
+ echo "Line coverage: ${LINE_RATE}%"
29
+ if [ "$LINE_RATE" != "100" ]; then
30
+ echo "::error::Line coverage is ${LINE_RATE}%, required 100%"
31
+ exit 1
32
+ fi
0 commit comments