-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (56 loc) · 2.07 KB
/
php.yaml
File metadata and controls
63 lines (56 loc) · 2.07 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
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: ["*", "*/*"]
jobs:
test:
runs-on: ${{matrix.operating-system}}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ["8.1", "8.2", "8.3"]
ts: ["ts", "nts"]
name: PHP ${{matrix.php-versions}} (${{matrix.ts}}) on ${{matrix.operating-system}}
steps:
- uses: actions/checkout@v3
- name: Setup PHP
continue-on-error: ${{ matrix.php-versions == '8.3' }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.php-versions}}
ini-values: zend.assertions = 1, assert.active = On, assert.exception=1, assert.bail=1
coverage: xdebug
env:
phpts: ${{matrix.ts}}
update: true
- name: Validate composer.json and composer.lock
continue-on-error: ${{ matrix.php-versions == '8.3' }}
run: composer validate --strict
- name: Cache Composer packages
continue-on-error: ${{ matrix.php-versions == '8.3' }}
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
continue-on-error: ${{ matrix.php-versions == '8.3' }}
run: composer install --no-progress --no-interaction --ignore-platform-reqs
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Lint
continue-on-error: ${{ matrix.php-versions == '8.3' }}
run: composer lint
- name: Run test suite
continue-on-error: ${{ matrix.php-versions == '8.3' }}
run: composer test
- name: Run infection tests
continue-on-error: ${{ matrix.php-versions == '8.3' }}
run: composer infect
- name: Psalm
continue-on-error: ${{ matrix.php-versions == '8.3' }}
run: composer psalm