-
Notifications
You must be signed in to change notification settings - Fork 4
77 lines (65 loc) · 2.37 KB
/
ci.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
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: test suite
on:
pull_request:
push:
branches:
- master
schedule: # Ensure weekly test also if no pushes happen to keep up with dependencies
- cron: 0 11 * * 1
jobs:
run:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || matrix.dependencies == 'beta' }}
strategy:
fail-fast: false
matrix:
php:
- '8.1'
- '8.2'
- '8.3'
dependencies: [ stable, beta, lowest ]
experimental: [ false ]
include:
- description: 'stable dependencies'
dependencies: stable
- description: 'lowest dependencies'
dependencies: lowest
- description: 'beta/RC dependencies'
dependencies: beta
# - description: 'nightly with stable dependencies'
# php: 8.4
# experimental: true
name: PHP ${{ matrix.php }} ${{ matrix.description }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl, mbstring
ini-values: zend.assertions=1
- name: Dump PHP diagnostics
run: php -i && php -m
- name: Allow beta dependencies
run: composer config minimum-stability beta
if: matrix.dependencies == 'beta'
- name: Install dependencies
run: composer update --no-progress ${{ (matrix.dependencies == 'lowest') && '--prefer-lowest --prefer-stable' || ''}}
- name: Check code style
run: vendor/bin/php-cs-fixer fix --dry-run
if: ${{ matrix.dependencies == 'stable' && !matrix.experimental }}
- name: Run PHPStan static analysis
run: vendor/bin/phpstan
if: ${{ matrix.dependencies != 'lowest' && !matrix.experimental }}
- name: Run automated tests
run: vendor/bin/phpunit --coverage-text --coverage-xml build/coverage-xml --coverage-cobertura build/cobertura.xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run infection tests
run: vendor/bin/infection --threads=max
if: ${{ matrix.dependencies == 'stable' && !matrix.experimental }}
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_TOKEN }}