-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (41 loc) · 1.21 KB
/
tests.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
name: tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.2, 8.3]
stability: [prefer-lowest, prefer-stable]
name: Unit Tests (${{matrix.php}}, ${{ matrix.os }}, ${{ matrix.stability }})
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extension-csv: mbstring, xdebug
coverage: xdebug
- name: Install Dependencies
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --${{ matrix.stability }} --ignore-platform-reqs --prefer-dist --no-interaction --no-progress
- name: Validate composer.json
run: composer validate
- name: Execute tests
run: vendor/bin/phpunit --testdox