Skip to content

Commit f69ea0a

Browse files
authored
Merge pull request #36 from artengin/github-actions
fix: git hub checks
2 parents 53f6a5f + 361d99f commit f69ea0a

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

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

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,41 @@ jobs:
1313
matrix:
1414
php-version: [ "8.3", "8.4" ]
1515
steps:
16-
- uses: shivammathur/setup-php@v2
16+
- name: Set up PHP
17+
uses: shivammathur/setup-php@v2
1718
with:
1819
php-version: ${{ matrix.php-version }}
19-
coverage: xdebug, pcov
20-
tools: composer:v2
21-
22-
- uses: actions/checkout@v4
23-
with:
24-
fetch-depth: 0
25-
20+
coverage: xdebug
21+
tools: composer
22+
- name: Checkout
23+
uses: actions/checkout@v4
2624
- name: Install Dependencies
2725
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
28-
2926
- name: Execute unit tests via PHPUnit with coverage
3027
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
3134

35+
upload-to-coveralls:
36+
needs: tests-with-coverage
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Set up PHP
40+
uses: shivammathur/setup-php@v2
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
- name: Import coverage report
44+
uses: actions/download-artifact@v4
45+
with:
46+
name: clover.xml
47+
path: build/logs
3248
- name: Upload coverage results to Coveralls
3349
env:
3450
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3551
run: |
3652
composer global require php-coveralls/php-coveralls
37-
php-coveralls --coverage_clover=build/logs/clover.xml -v
53+
php-coveralls --coverage_clover=build/logs/clover.xml -v --json_path=coveralls-upload.json

0 commit comments

Comments
 (0)