-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.54 KB
/
ci.yml
File metadata and controls
56 lines (45 loc) · 1.54 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
name: "ci"
on:
pull_request: ~
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
ci:
name: PHP ${{ matrix.php-version }} - Composer ${{ matrix.composer-deps }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ["8.2", "8.3", "8.4", "8.5"]
composer-deps: [lowest, stable]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
with:
coverage: none
php-version: ${{ matrix.php-version }}
tools: composer:v2
- name: Validate composer.json
run: composer validate --strict
- name: Install dependencies (lowest)
if: matrix.composer-deps == 'lowest'
run: composer update --prefer-lowest --prefer-stable --no-interaction --no-progress
- name: Install dependencies (stable)
if: matrix.composer-deps == 'stable'
run: composer install --no-interaction --no-progress
- name: PHP CS Fixer
run: vendor/bin/php-cs-fixer check --using-cache=no --show-progress=none
- name: PHPStan
run: vendor/bin/phpstan analyse -c phpstan.dist.neon --no-progress
- name: PHPUnit
run: vendor/bin/phpunit --colors=always --do-not-cache-result