-
Notifications
You must be signed in to change notification settings - Fork 519
111 lines (108 loc) · 4.28 KB
/
build.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: build
on: [push, pull_request]
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
phpstan:
runs-on: ubuntu-22.04
name: PHPStan
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- run: |
composer require --no-update doctrine/annotations:"^2.0" liip/imagine-bundle:"^2.8" phpstan/extension-installer phpstan/phpstan-phpunit phpstan/phpstan:1.9.*
composer config --no-plugins allow-plugins.phpstan/extension-installer true
composer install --ignore-platform-reqs
XDEBUG_MODE=off vendor/bin/phpstan
cs-fixer:
runs-on: ubuntu-22.04
name: PHP-CS-Fixer
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fix CS
uses: docker://oskarstark/php-cs-fixer-ga
validate-markdown:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate
uses: avto-dev/markdown-lint@v1
with:
config: './.github/workflows/config/config.json'
args: './docs ./CONTRIBUTING.md ./README.md ./UPDATE.md'
tests:
runs-on: ubuntu-22.04
strategy:
matrix:
php:
- '8.1'
- '8.2'
dependencies: [highest]
symfony: ['*']
with_imagine: [false]
with_oneupbundle: [true]
max_deprecations: [0]
include:
- extra:
php: '8.1'
symfony: '5.4.*'
dependencies: lowest
with_imagine: false
with_oneupbundle: false
max_deprecations: 5
- php: '8.1'
symfony: '6.3.*'
dependencies: highest
with_imagine: false
with_oneupbundle: true
max_deprecations: 0
- php: '8.2'
symfony: '6.4.*'
dependencies: highest
with_imagine: false
with_oneupbundle: false
max_deprecations: 0
- php: '8.3'
symfony: '7.0.*'
dependencies: highest
with_imagine: false
with_oneupbundle: false
max_deprecations: 0
name: PHP ${{ matrix.php }} with Symfony ${{ matrix.symfony }} tests with ${{ matrix.dependencies }} dependencies
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: ${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.dependencies }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mongodb-stable, pdo_sqlite
- run: composer require --no-update doctrine/annotations:^1.14
- run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-interaction --no-progress symfony/flex:^2.2
composer config extra.symfony.require ${{ matrix.symfony }}
if: matrix.symfony != '*'
- run: composer require --no-update liip/imagine-bundle:"^2.0"
if: matrix.with_imagine
- run: composer require --no-update oneup/flysystem-bundle:"^4.0.1"
if: matrix.with_oneupbundle
- name: Update project dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Run tests
run: vendor/bin/phpunit
env:
SYMFONY_DEPRECATIONS_HELPER: max[self]=${{matrix.max_deprecations}}