Skip to content

Commit 35e78c0

Browse files
committed
Fix code coverage reports
1 parent 42bd618 commit 35e78c0

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/php.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
extensions: intl, mbstring, mysql, pdo, pdo_sqlite, soap, sodium, xml
5656
tools: composer:v2
5757
ini-values: error_reporting=E_ALL
58-
coverage: xdebug
58+
coverage: pcov
5959

6060
- name: Setup problem matchers for PHP
6161
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -91,11 +91,11 @@ jobs:
9191

9292
- name: Run unit tests with coverage
9393
if: ${{ matrix.php-versions == '8.5' }}
94-
run: ./vendor/bin/phpunit
94+
run: vendor/bin/phpunit
9595

9696
- name: Run unit tests (no coverage)
9797
if: ${{ matrix.php-versions != '8.5' }}
98-
run: ./vendor/bin/phpunit --no-coverage
98+
run: vendor/bin/phpunit --no-coverage
9999

100100
- name: Save coverage data
101101
if: ${{ matrix.php-versions == '8.5' }}
@@ -272,6 +272,8 @@ jobs:
272272
runs-on: [ubuntu-latest]
273273
needs: [unit-tests-linux]
274274
steps:
275+
- uses: actions/checkout@v6
276+
275277
- uses: actions/download-artifact@v8
276278
with:
277279
name: coverage-data

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"SimpleSAML\\Module\\admin\\": "modules/admin/src",
2626
"SimpleSAML\\Module\\core\\": "modules/core/src",
2727
"SimpleSAML\\Module\\cron\\": "modules/cron/src",
28+
"SimpleSAML\\Module\\debugsp\\": "modules/debugsp/src",
2829
"SimpleSAML\\Module\\exampleauth\\": "modules/exampleauth/src",
2930
"SimpleSAML\\Module\\multiauth\\": "modules/multiauth/src",
3031
"SimpleSAML\\Module\\saml\\": "modules/saml/src"
@@ -37,6 +38,7 @@
3738
"SimpleSAML\\Test\\Module\\admin\\": ["tests//modules/admin/src"],
3839
"SimpleSAML\\Test\\Module\\core\\": ["tests/modules/core/src"],
3940
"SimpleSAML\\Test\\Module\\cron\\": ["tests/modules/cron/src"],
41+
"SimpleSAML\\Test\\Module\\debugsp\\": ["tests/modules/debugsp/src"],
4042
"SimpleSAML\\Test\\Module\\exampleauth\\": ["tests/modules/exampleauth/src"],
4143
"SimpleSAML\\Test\\Module\\multiauth\\": ["tests/modules/multiauth/src"],
4244
"SimpleSAML\\Test\\Module\\saml\\": ["tests/modules/saml/src"]

phpunit.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<coverage>
44
<report>
55
<clover outputFile="build/logs/clover.xml"/>
6-
<html outputDirectory="build/coverage" lowUpperBound="35" highLowerBound="70"/>
7-
<text outputFile="php://stdout" showUncoveredFiles="true"/>
86
</report>
97
</coverage>
108
<testsuites>
@@ -16,7 +14,13 @@
1614
<logging/>
1715
<source>
1816
<include>
19-
<directory suffix=".php">./modules/*/src</directory>
17+
<directory suffix=".php">./modules/admin/src</directory>
18+
<directory suffix=".php">./modules/core/src</directory>
19+
<directory suffix=".php">./modules/cron/src</directory>
20+
<directory suffix=".php">./modules/debugsp/src</directory>
21+
<directory suffix=".php">./modules/exampleauth/src</directory>
22+
<directory suffix=".php">./modules/multiauth/src</directory>
23+
<directory suffix=".php">./modules/saml/src</directory>
2024
<directory suffix=".php">./src</directory>
2125
</include>
2226
<exclude>

0 commit comments

Comments
 (0)