-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.6 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
50
51
52
53
54
55
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.2', '8.3']
coverage: ['xdebug']
xdebug_mode: ['debug']
name: php${{ matrix.php-versions }}
steps:
- name: Install Dependencies
run: |
apt-get update
apt-get install -y espeak-ng
- name: Checkout
uses: actions/checkout@v4
- 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: composer run test:unit
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