forked from FriendsOfSymfony/FOSHttpCacheBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 2.1 KB
/
php.yml
File metadata and controls
61 lines (58 loc) · 2.1 KB
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
name: CI
env:
SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit"
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Test the latest stable release
- php-version: '7.3'
- php-version: '7.4'
- php-version: '8.0'
# Test Symfony LTS versions. Read more at https://github.com/symfony/lts
- php-version: '7.4'
dependencies: 'symfony/lts:^3'
- php-version: '8.0'
symfony-version: '^4'
- php-version: '8.0'
symfony-version: '^5'
# Minimum supported dependencies with the oldest PHP version
- php-version: '7.3'
composer-flag: '--prefer-stable --prefer-lowest'
# Test latest unreleased versions
- php-version: '8.0'
symfony-version: '^5'
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@v2
- name: Install PHP and Composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
- name: Check PHP Version
run: php -v
- 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: Symfony version
run: composer require --no-update symfony/flex && composer config extra.symfony.require ${{ matrix.symfony-version}}
if: ${{ matrix.symfony-version }}
- name: Composer update
run: composer update ${{ matrix.composer-flag }} --prefer-dist --no-interaction
- name: Composer validate
run: composer validate --strict --no-check-lock
- name: Run tests
run: php vendor/bin/simple-phpunit -v