-
Notifications
You must be signed in to change notification settings - Fork 104
88 lines (75 loc) · 2.17 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
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
name: CI
on:
pull_request: ~
push:
branches:
- master
jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
build:
name: Build
runs-on: Ubuntu-20.04
strategy:
fail-fast: false
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0']
composer: ['']
phpunit: ['']
deprecation: ['']
symfony: ['']
stability: ['']
include:
# Minimum supported dependencies with the latest and oldest PHP version
- php: 8.0
composer: --prefer-stable --prefer-lowest
deprecation: max[direct]=0
- php: 7.1
composer: --prefer-stable --prefer-lowest
deprecation: max[direct]=0
# symfony version
- php: 8.0
symfony: '^3.0'
- php: 8.0
symfony: '^4.0'
- php: 8.0
symfony: '^5.0'
# dev
- php: 8.0
stability: 'dev'
steps:
- name: Set up PHP
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php }}
coverage: none
tools: flex
- name: Checkout code
uses: actions/checkout@v2
- name: Setup stability
if: matrix.stability != ''
run: composer config minimum-stability "${{ matrix.stability }}"
- name: Setup deprecation
if: matrix.deprecation != ''
run: echo 'SYMFONY_DEPRECATIONS_HELPER=${{ matrix.deprecation }}' >> $GITHUB_ENV
- name: Setup symfony
if: matrix.symfony != ''
run: |
echo 'SYMFONY_REQUIRE=${{ matrix.symfony }}' >> $GITHUB_ENV
- name: Download dependencies
run: |
composer update ${{ matrix.composer}} --prefer-dist --no-interaction
./vendor/bin/simple-phpunit install
- name: Validate
run: |
composer validate --strict --no-check-lock
- name: Run tests
env:
SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT: 1
run: |
${{ matrix.phpunit }} ./vendor/bin/simple-phpunit