-
Notifications
You must be signed in to change notification settings - Fork 70
54 lines (44 loc) · 1.36 KB
/
Copy pathphpunit.yml
File metadata and controls
54 lines (44 loc) · 1.36 KB
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
name: PHPUnit
on:
push:
branches: [ "master", "v4.0" ]
pull_request:
branches: [ "master", "v4.0" ]
permissions: {}
concurrency:
group: phpunit-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: PHPUnit (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
php: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: zip, bz2, posix, fileinfo, curl, mbstring, phar
coverage: none
tools: composer
- name: Cache Composer packages
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ runner.os }}-php${{ matrix.php }}-${{ hashFiles('composer.json') }}
restore-keys: composer-${{ runner.os }}-php${{ matrix.php }}-
- name: Install dependencies
# no lock file is committed; resolve a PHPUnit compatible with this
# runner's PHP (PU10 on 8.1, 11 on 8.2, 12 on 8.3, 13 on 8.4/8.5)
run: composer update --no-interaction --no-progress
- name: Build dist artifacts
run: php compiler.php
- name: Run test suite
run: ./vendor/bin/phpunit