File tree Expand file tree Collapse file tree 1 file changed +30
-4
lines changed Expand file tree Collapse file tree 1 file changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ name: Run tests with coverage
22
33on :
44 push :
5- branches : ["master"]
5+ branches : [ "master" ]
66 pull_request :
7- branches : ["master"]
7+ branches : [ "master" ]
88
99jobs :
1010 tests-with-coverage :
@@ -16,14 +16,40 @@ jobs:
1616 - uses : shivammathur/setup-php@v2
1717 with :
1818 php-version : ${{ matrix.php-version }}
19- - uses : actions/checkout@v3
19+ coverage : xdebug, pcov
20+ tools : composer:v2
21+ - uses : actions/checkout@v4
22+ with :
23+ fetch-depth : 0
2024 - name : Install Dependencies
2125 run : composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
2226 - name : Execute unit tests via PHPUnit with coverage
2327 run : vendor/bin/phpunit --coverage-clover build/logs/clover.xml
28+ - name : Export coverage report
29+ if : ${{ matrix.php-version == '8.4' }}
30+ uses : actions/upload-artifact@v4
31+ with :
32+ name : clover.xml
33+ path : build/logs
34+
35+ upload-to-coveralls :
36+ needs : tests-with-coverage
37+ runs-on : ubuntu-latest
38+ steps :
39+ - uses : shivammathur/setup-php@v2
40+ with :
41+ php-version : " 8.4"
42+ tools : composer:v2
43+ - uses : actions/checkout@v4
44+ with :
45+ fetch-depth : 0
46+ - uses : actions/download-artifact@v4
47+ with :
48+ name : clover.xml
49+ path : build/logs
2450 - name : Upload coverage results to Coveralls
2551 env :
2652 COVERALLS_REPO_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2753 run : |
2854 composer global require php-coveralls/php-coveralls
29- php-coveralls --coverage_clover=build/logs/clover.xml -v
55+ php-coveralls --coverage_clover=build/logs/clover.xml -v --json_path=coveralls-upload.json
You can’t perform that action at this time.
0 commit comments