-
Notifications
You must be signed in to change notification settings - Fork 380
77 lines (61 loc) · 2.28 KB
/
ci.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
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
pull_request:
jobs:
check_composer:
name: Check composer metadata
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
- name: Validate composer.json
run: composer validate --strict --no-check-lock
static_analysis:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.2'
- name: Install dependencies
run: composer update --ansi --no-progress --prefer-dist --no-interaction
- name: Install PHPUnit
run: vendor/bin/simple-phpunit install
- run: vendor/bin/phpstan analyze
tests:
name: "Tests on PHP ${{ matrix.php }}${{ matrix.name_suffix }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
name_suffix: ['']
stability: ['stable']
composer_flags: ['']
include:
- php: '7.4'
name_suffix: ' (lowest deps)'
stability: 'stable'
composer_flags: '--prefer-lowest'
- php: '8.3'
name_suffix: ' (dev deps)'
stability: 'dev'
composer_flags: ''
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "${{ matrix.php }}"
- name: Configure stability
if: "matrix.stability != 'stable'"
run: composer config minimum-stability ${{ matrix.stability }}
- name: Install dependencies
run: composer update --ansi --no-progress --prefer-dist ${{ matrix.composer_flags }}
- name: Install PHPUnit
run: vendor/bin/simple-phpunit install
- name: Run tests
run: vendor/bin/simple-phpunit -v --colors=always