-
Notifications
You must be signed in to change notification settings - Fork 6
67 lines (49 loc) · 1.74 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
56
57
58
59
60
61
62
63
64
65
66
67
name: PHPUnit
on: [ push, pull_request ]
jobs:
test:
name: Run PHPUnit on PHP ${{ matrix.php }} with ${{ matrix.dependencies }} dependencies
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
dependencies: [ 'lowest', 'highest' ]
exclude:
- php: '8.0'
dependencies: 'lowest'
- php: '8.1'
dependencies: 'lowest'
- php: '8.2'
dependencies: 'lowest'
env:
PHP_VERSION: ${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build containers
run: docker compose build
- name: Install Composer dependencies with the highest version
if: matrix.dependencies == 'highest'
run: docker compose run composer update --no-interaction --no-progress
- name: Install Composer dependencies with the lowest stable version
if: matrix.dependencies == 'lowest'
run: docker compose run composer update --no-interaction --no-progress --prefer-lowest --prefer-stable
- name: Run PHPUnit
run: docker compose run phpunit
coverage:
name: Analyze code coverage
runs-on: ubuntu-latest
env:
PHP_VERSION: 7.2
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build containers
run: docker compose build
- name: Install Composer dependencies
run: docker compose run composer update --no-interaction --no-progress
- name: Run PHPUnit with a coverage analysis
run: docker compose run phpunit --coverage-clover coverage.xml
- name: Upload the coverage report
uses: codecov/codecov-action@v3