-
-
Notifications
You must be signed in to change notification settings - Fork 285
70 lines (63 loc) · 2.44 KB
/
test.yaml
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
68
69
70
name: Unit Tests
on:
pull_request: ~
push:
branches:
- master
jobs:
ci:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3', '8.4']
dependency-version: [prefer-lowest, prefer-stable]
composer-version: [ v2 ]
include:
- php: '8.4'
phpunit: '^12.0'
- php: '8.3'
phpunit: '^12.0'
- php: '8.3'
phpunit: '^12.0'
- php: '8.2'
phpunit: '^12.0'
- php: '8.3'
phpunit: '^11.0'
- php: '8.2'
phpunit: '^11.0'
- php: '8.3'
phpunit: '^10.0'
- php: '8.2'
phpunit: '^10.0'
- php: '8.1'
phpunit: '^10.0'
exclude:
- dependency-version: prefer-lowest
php: '8.1'
- dependency-version: prefer-lowest
php: '8.2'
- dependency-version: prefer-lowest
php: '8.3'
name: ${{ matrix.php }} - Composer ${{ matrix.composer-version }} --${{ matrix.dependency-version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ matrix.composer-version }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, mbstring, zip, xml
coverage: none
tools: composer:${{ matrix.composer-version }}
- name: Install Composer dependencies
run: composer update --${{ matrix.dependency-version }} --ansi --no-interaction --prefer-dist
- name: Force PHPUnit version
run: composer require --dev phpunit/phpunit:${{ matrix.phpunit }} --with-all-dependencies -n --ansi
- name: Unit Tests
run: vendor/bin/phpunit