-
Notifications
You must be signed in to change notification settings - Fork 9
92 lines (79 loc) · 2.01 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: CI
on:
pull_request: ~
push:
branches:
- main
release:
types:
- created
schedule:
- cron: '0 */12 * * *'
jobs:
test:
name: "Build and Test - PHP ${{ matrix.php }} Symfony:${{ matrix.symfony-version }} ${{ matrix.deps }}"
runs-on: ubuntu-latest
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
strategy:
matrix:
include:
- symfony-version: 6.3
php: 8.1
deps: low
- symfony-version: 6.4
php: 8.1
deps: high
- symfony-version: 7.0
php: 8.2
deps: high
- symfony-version: 7.1
php: 8.3
deps: high
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php }}
- name: Install dependencies
if: matrix.deps == 'high'
run: composer install
- name: Install dependencies (min)
if: matrix.deps == 'low'
run: composer update --prefer-lowest --prefer-stable
- name: Run tests
run: |
./vendor/bin/phpunit
php-cs-fixer:
name: PHP CS Fixer
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: php-cs-fixer
- name: Run PHP-CS-Fixer
run:
php-cs-fixer fix --dry-run --diff
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: phpstan
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Run PHPStan
run: vendor/bin/phpstan analyse