-
Notifications
You must be signed in to change notification settings - Fork 6
124 lines (105 loc) · 3.34 KB
/
tests.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Tests
on:
push:
branches:
- 'master'
- '[0-9].[0-9]+'
pull_request: ~
env:
COMPOSER_ROOT_VERSION: dev-master
jobs:
tests:
name: ${{ matrix.php }} / ${{ matrix.symfony }} / ${{ matrix.phpunit }} / ${{ matrix.db }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.1']
symfony: ['~5.4.0', '~6.3.0']
phpunit: ['phpunit.xml', 'phpunit-api.xml']
db: ['sqlite']
deps: ['normal']
include:
- php: '7.4'
symfony: '~3.4.0'
phpunit: 'phpunit.xml'
db: 'sqlite'
- php: '7.4'
symfony: '~3.4.0'
phpunit: 'phpunit-api-legacy.xml'
db: 'sqlite'
- php: '7.4'
symfony: '~5.4.0'
phpunit: 'phpunit.xml'
db: 'mysql'
- php: '7.4'
symfony: '~5.4.0'
phpunit: 'phpunit-api.xml'
db: 'mysql'
- php: '8.1'
symfony: '~6.3.0'
phpunit: 'phpunit.xml'
db: 'postgres'
- php: '8.1'
symfony: '~6.3.0'
phpunit: 'phpunit-api.xml'
db: 'postgres'
- php: '7.4'
symfony: '~3.4.0'
phpunit: 'phpunit.xml'
db: 'sqlite'
deps: 'low'
- php: '7.4'
symfony: '~3.4.0'
phpunit: 'phpunit-api-legacy.xml'
db: 'sqlite'
deps: 'low'
exclude:
- php: '8.1'
symfony: '~3.4.0'
- php: '7.4'
symfony: '~6.3.0'
services:
mysql:
image: 'mysql:latest'
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: testdb
ports:
- '3306:3306'
postgres:
image: 'postgres:latest'
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: testdb
ports:
- '5432:5432'
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- run: composer --version
- run: composer validate --strict
- run: echo "DATABASE=mysql://[email protected]/testdb" >> $GITHUB_ENV
if: ${{ matrix.db == 'mysql' }}
- run: echo "DATABASE=pgsql://postgres:[email protected]/testdb" >> $GITHUB_ENV
if: ${{ matrix.db == 'postgres' }}
# Install Flex as a global dependency to enable usage of extra.symfony.require
# while keeping Flex recipes from applying
- run: composer global config --no-plugins allow-plugins.symfony/flex true
- run: composer global require --no-scripts symfony/flex
- run: composer config extra.symfony.require ${{ matrix.symfony }}
# Adds a dependency required for Symfony 3.4 tests due to incompatibility
# of symfony/proxy-manager-bridge and laminas/laminas-code
- run: composer require --dev --no-update laminas/laminas-zendframework-bridge
if: ${{ matrix.symfony == '~3.4.0' }}
-
run: composer update --prefer-dist
if: ${{ matrix.deps != 'low' }}
-
run: composer update --prefer-dist --prefer-lowest --prefer-stable
if: ${{ matrix.deps == 'low' }}
- run: vendor/bin/phpunit -c ${{ matrix.phpunit }} --colors=always