Skip to content

Commit deac83c

Browse files
committed
fix: git hub checks
1 parent c82cea3 commit deac83c

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

.github/workflows/run-tests-with-coverage.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Run tests with coverage
22

33
on:
44
push:
5-
branches: ["master"]
5+
branches: [ "master" ]
66
pull_request:
7-
branches: ["master"]
7+
branches: [ "master" ]
88

99
jobs:
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

0 commit comments

Comments
 (0)