Skip to content

Commit 41b3d58

Browse files
committed
Send junit test logs to Codecov
Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent 6f9d587 commit 41b3d58

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ jobs:
6060
token: ${{ secrets.CODECOV_TOKEN }}
6161
flags: unit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
6262
name: phpunit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
63+
report-type: coverage
64+
65+
- name: Upload test results
66+
uses: codecov/codecov-action@v5
67+
# Do not run this step on forked versions of the main repository (example: contributor forks)
68+
if: ${{ github.repository == 'phpmyadmin/shapefile' && !cancelled() }}
69+
with:
70+
fail_ci_if_error: true
71+
token: ${{ secrets.CODECOV_TOKEN }}
72+
flags: unit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
73+
name: phpunit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
74+
report-type: test_results
6375

6476
- name: Send coverage to Scrutinizer
6577
uses: sudo-bot/action-scrutinizer@latest

phpunit.xml.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
<directory suffix=".php">src</directory>
1010
</include>
1111
</source>
12+
<logging>
13+
<junit outputFile="build/logs/junit.xml"/>
14+
</logging>
1215
<coverage>
1316
<report>
1417
<clover outputFile="build/logs/clover.xml"/>

0 commit comments

Comments
 (0)