-
Notifications
You must be signed in to change notification settings - Fork 4
151 lines (137 loc) · 5.15 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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: CI
on:
push:
pull_request:
jobs:
phpunit-sqlite:
name: PHPUnit (PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} - Doctrine ${{ matrix.doctrine }} - SQLite - ${{ matrix.operating-system }})
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest, windows-latest ]
php: ['8.1', '8.2', '8.3', '8.4']
symfony: ['5.4.*', '6.4.*', '7.2.*']
doctrine: ['^2.5', '^3.0']
exclude:
- { php: '8.1', symfony: '7.2.*' }
- { php: '8.1', doctrine: '^3.0' }
- { symfony: '5.4.*', doctrine: '^3.0' }
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: flex
extensions: pdo_sqlite
coverage: none
- uses: ramsey/composer-install@v3
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
with:
composer-options: --with=doctrine/orm:${{ matrix.doctrine }}
- run: vendor/bin/phpunit tests
env:
DATABASE_URL: 'sqlite:///:memory:'
phpunit-mysql:
name: PHPUnit (PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} - Doctrine ${{ matrix.doctrine }} - MySQL)
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test_db
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3', '8.4']
symfony: ['5.4.*', '6.4.*', '7.2.*']
doctrine: ['^2.5', '^3.0']
exclude:
- { php: '8.1', symfony: '7.2.*' }
- { php: '8.1', doctrine: '^3.0' }
- { symfony: '5.4.*', doctrine: '^3.0' }
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: flex
extensions: pdo_mysql
coverage: none
- uses: ramsey/composer-install@v3
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
with:
composer-options: --with=doctrine/orm:${{ matrix.doctrine }}
- run: vendor/bin/phpunit tests
env:
DATABASE_URL: 'mysql://root:@127.0.0.1:3306/test_db'
phpunit-postgres:
name: PHPUnit (PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} - Doctrine ${{ matrix.doctrine }} - PostgreSQL)
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
options: >-
--health-cmd pg_isready
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3', '8.4']
symfony: ['5.4.*', '6.4.*', '7.2.*']
doctrine: ['^2.5', '^3.0']
exclude:
- { php: '8.1', symfony: '7.2.*' }
- { php: '8.1', doctrine: '^3.0' }
- { symfony: '5.4.*', doctrine: '^3.0' }
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: flex
extensions: pdo_pgsql
coverage: none
- uses: ramsey/composer-install@v3
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
with:
composer-options: --with=doctrine/orm:${{ matrix.doctrine }}
- run: vendor/bin/phpunit tests
env:
DATABASE_URL: 'postgresql://postgres:[email protected]:5432/test_db'
ecs:
name: Easy Coding Standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: latest
coverage: none
- uses: ramsey/composer-install@v3
- run: vendor/bin/ecs
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: latest
coverage: none
- uses: ramsey/composer-install@v3
- run: vendor/bin/phpstan