-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.45 KB
/
phpunit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: PHPUnit
on: pull_request
jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['8.0', '8.1', '8.2']
coverage: ['xdebug']
xdebug_mode: ['debug']
name: php${{ matrix.php-versions }}
steps:
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: ${{ matrix.coverage }}
- name: Set up PHP dependencies
run: composer i
- name: PHPUnit
env:
XDEBUG_MODE: ${{ matrix.xdebug_mode }}
run: ./vendor/bin/phpunit -c phpunit.xml
upload-coverage:
needs: phpunit
runs-on: ubuntu-latest
steps:
- name: Upload coverage results to Coveralls
if: matrix.xdebug_mode == 'coverage'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: php-${{ matrix.php-versions }}
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml --json_path=build/logs/coveralls-upload.json -v
finish-coverage:
needs: upload-coverage
runs-on: ubuntu-latest
steps:
- name: Let Coveralls know that all tests have finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true