@@ -5,6 +5,10 @@ on: [push, pull_request]
55jobs :
66 tests :
77 runs-on : ubuntu-latest
8+ permissions :
9+ contents : read
10+ id-token : write
11+
812 strategy :
913 matrix :
1014 php : ['8.0', '8.1', '8.3', '8.4', '8.5']
@@ -21,33 +25,37 @@ jobs:
2125 uses : shivammathur/setup-php@v2
2226 with :
2327 php-version : ${{ matrix.php }}
24- extensions : mbstring, json
28+ extensions : mbstring
2529 coverage : ${{ matrix.coverage && 'xdebug' || 'none' }}
2630
2731 - name : Install dependencies
2832 run : composer update --no-interaction
2933
34+ # Run tests WITHOUT coverage on non-coverage matrix jobs
3035 - name : Execute tests
31- if : ${{ ! matrix.coverage }}
32- run : |
33- ./vendor/bin/phpunit --testdox
36+ if : ${{ !matrix.coverage }}
37+ run : ./vendor/bin/phpunit --testdox
3438
35- - name : Upload the reports to codeclimate
39+ # Run tests WITH Clover coverage for the coverage job
40+ - name : Execute tests with coverage (Clover)
3641 if : ${{ matrix.coverage }}
3742 env :
3843 XDEBUG_MODE : coverage
39- CC_TEST_REPORTER_ID : 5e32818628fac9eb11d34e2b35289f88169610cc4a98c6f170c74923342284f1
40- uses : paambaati/codeclimate-action@v9
44+ run : ./vendor/bin/phpunit --coverage-clover=build/logs/clover.xml --testdox
45+
46+ - name : Upload coverage to Qlty
47+ if : ${{ matrix.coverage }}
48+ uses : qltysh/qlty-action/coverage@v2
4149 with :
42- coverageCommand : |
43- ./vendor/bin/phpunit --coverage-clover= build/logs/clover.xml --testdox
50+ oidc : true
51+ files : build/logs/clover.xml
4452
4553 - name : Upload the reports to coveralls.io
4654 if : ${{ matrix.coverage }}
47- env :
48- COVERALLS_REPO_TOKEN : ${{ github.token }}
4955 uses : coverallsapp/github-action@v2
5056 with :
51- github-token : ${{ env.COVERALLS_REPO_TOKEN }}
57+ github-token : ${{ secrets.GITHUB_TOKEN }}
58+ file : build/logs/clover.xml
59+ format : clover
5260 flag-name : Unit
53- allow-empty : false
61+ allow-empty : false
0 commit comments