-
Notifications
You must be signed in to change notification settings - Fork 9
53 lines (52 loc) · 1.63 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
name: Continuous Integration
on:
push:
branches-ignore:
- 'release-please**'
pull_request:
branches-ignore:
- 'release-please**'
jobs:
code-quality:
name: Run code quality checks on PHP 7.4
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dependency-version: ['', '--prefer-lowest']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Install dependencies
run: composer update ${{ matrix.dependency-version }} --no-ansi --no-interaction --no-scripts --no-suggest --prefer-dist
- name: Run code quality checks
run: vendor/bin/grumphp run --testsuite=code_quality
php-test:
name: Run tests on ${{ matrix.php }}
runs-on: ubuntu-latest
needs: code-quality
strategy:
fail-fast: false
matrix:
dependency-version: ['']
php: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
include:
- dependency-version: '--prefer-lowest'
php: '7.3'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Remove GrumPHP
run: composer remove --dev phpro/grumphp
- name: Install dependencies
run: composer update ${{ matrix.dependency-version }} --no-ansi --no-interaction --no-scripts --no-suggest --prefer-dist
- name: Run unit tests
run: vendor/bin/phpunit --testsuite unit