-
Notifications
You must be signed in to change notification settings - Fork 93
59 lines (49 loc) · 1.35 KB
/
build.yml
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
name: Build
on:
push:
branches: [ master ]
pull_request:
release:
types: [ created ]
jobs:
check_code_style:
name: Check code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.3'
- name: Install dependencies
run: composer update
- run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --show-progress=dots
tests:
runs-on: ubuntu-latest
name: Build and test
strategy:
fail-fast: false
matrix:
php: [ 8.1, 8.2, 8.3, 8.4 ]
composer-flags: [ "" ]
symfony-version: [ "" ]
include:
- php: 8.1
symfony-version: '^5.4'
- php: 8.1
symfony-version: '^6.4'
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
ini-file: "development"
coverage: none
- name: Update Symfony version
if: matrix.symfony-version != ''
run: composer require --no-update "symfony/symfony:${{ matrix.symfony-version }}"
- name: Install dependencies
run: composer update ${{ matrix.composer-flags }}
- name: Run tests (phpunit)
run: ./vendor/bin/phpunit