-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (39 loc) · 1.69 KB
/
ci.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
name: "CI Tests"
on:
pull_request:
push:
jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.can-fail }}
name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}"
strategy:
matrix:
include:
- { os: ubuntu-20.04, php: 7.4, symfony: "5.4.*", composer-flags: "--prefer-stable --prefer-lowest", can-fail: false }
- { os: ubuntu-latest, php: 8.3, symfony: "6.4.*", composer-flags: "--prefer-stable", can-fail: false }
- { os: ubuntu-latest, php: 8.2, symfony: "6.3.*", composer-flags: "--prefer-stable", can-fail: false }
- { os: ubuntu-latest, php: 8.2, symfony: "6.4.*", composer-flags: "--prefer-stable", can-fail: false }
- { os: ubuntu-latest, php: 8.3, symfony: "7.0.*", composer-flags: "--prefer-stable", can-fail: false }
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
fetch-depth: 2
- name: "Cache Composer packages"
uses: "actions/cache@v3"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('composer.json') }}-flags-${{ matrix.composer-flags }}"
restore-keys: "php-"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
tools: "composer:v2,flex"
- name: Install dependencies
run: composer update ${{ matrix.composer-flags }} --prefer-dist
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
- name: Run PHPUnit Tests
run: composer test