-
Notifications
You must be signed in to change notification settings - Fork 81
76 lines (64 loc) · 2.22 KB
/
php.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI
env:
SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit"
on:
push:
branches:
- "*.x"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# Test the latest stable release
- php-version: '8.1'
dependencies: 'jean-beru/fos-http-cache-cloudfront'
- php-version: '8.1'
symfony-version: '6.4'
- php-version: '8.2'
symfony-version: '6.4'
- php-version: '8.2'
symfony-version: '7.*'
- php-version: '8.3'
symfony-version: '7.*'
# Minimum supported dependencies with the oldest PHP version
- php-version: '8.1'
composer-flag: '--prefer-stable --prefer-lowest'
symfony-version: '6.4'
# Test latest unreleased versions
- php-version: '8.3'
stability: 'dev'
name: PHP ${{ matrix.php-version }} Test on Symfony ${{ matrix.symfony-version }} ${{ matrix.dependencies}} ${{ matrix.stability }} ${{ matrix.composer-flag }}
steps:
- name: Pull the code
uses: actions/checkout@v4
- name: Install PHP and Composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2, flex
coverage: none
- name: Stability
run: composer config minimum-stability ${{ matrix.stability }}
if: ${{ matrix.stability }}
- name: Additional require
run: composer require --no-update ${{ matrix.dependencies }}
if: ${{ matrix.dependencies }}
- name: Composer update
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
run: |
composer update ${{ matrix.composer-flag }} --prefer-dist --no-interaction --no-progress
- name: Composer validate
run: composer validate --strict --no-check-lock
if: ${{ matrix.stability != 'dev' }}
- name: Run tests
run: php vendor/bin/phpunit
if: ${{ matrix.stability != 'dev' }}
- name: Run tests allow to fail
run: php vendor/bin/phpunit || true
continue-on-error: true
if: ${{ matrix.stability == 'dev' }}