-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.37 KB
/
test.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
name: Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php: [5.6, '7.0', 7.1, 7.2, 7.3, 7.4, '8.0', 8.1, 8.2]
flags: [--prefer-lowest, '']
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- run: composer require phpunit/phpunit --dev --no-update
- run: composer update ${{ matrix.flags }}
- run: mkdir -p build/logs
- run: 'vendor/bin/phpunit --migrate-configuration || :'
- run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- name: Upload Coverage
uses: nick-invision/retry@v2
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: 'true'
COVERALLS_FLAG_NAME: 'php:${{ matrix.php }}'
with:
timeout_minutes: 1
max_attempts: 3
command: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
coverage-aggregation:
needs: build
runs-on: ubuntu-latest
steps:
- name: Aggregate Coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true