-
-
Notifications
You must be signed in to change notification settings - Fork 2
278 lines (267 loc) · 11.5 KB
/
Copy pathci.yml
File metadata and controls
278 lines (267 loc) · 11.5 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
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
# Cancel any in-progress run for the same ref (branch/PR) when a new commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Set node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run lint
- name: Format check
run: pnpm run fmt:check
- name: Typecheck
run: pnpm run typecheck
test:
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: ['22', '24', '26']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Set node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Test
run: pnpm test
bundler-versions:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
# `vite`/`@rsbuild/core` are optional peers; prove both ends of every supported major
# (the exact floor and the latest in range). `@vitejs/plugin-react@6` only peers Vite 8,
# so the Vite 7 rows pull `@vitejs/plugin-react@5` (covers 6/7/8) for the React HMR test.
- { name: 'Vite 7.0.0', add: 'vite@7.0.0 @vitejs/plugin-react@5' }
- { name: 'Vite ^7.0', add: 'vite@^7.0 @vitejs/plugin-react@5' }
- { name: 'Vite 8.0.0', add: 'vite@8.0.0' }
- { name: 'Vite ^8.0', add: 'vite@^8.0' }
- { name: 'Rsbuild 1.7.0', add: '@rsbuild/core@1.7.0' }
- { name: 'Rsbuild ^1.7', add: '@rsbuild/core@^1.7' }
- { name: 'Rsbuild 2.0.0', add: '@rsbuild/core@2.0.0' }
- { name: 'Rsbuild ^2.0', add: '@rsbuild/core@^2.0' }
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Set node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install
run: pnpm install --frozen-lockfile
- name: Pin ${{ matrix.name }}
run: pnpm --filter @symfony/reprise add -D ${{ matrix.add }}
- name: Build
run: pnpm build
- name: Test
run: pnpm test
php:
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}${{ matrix.dependency-version == 'lowest' && ' lowest' || '' }} on ${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
# Symfony 7.4 LTS on the lowest supported PHP, resolving the lowest allowed dependencies.
- php-version: '8.4'
symfony-version: 7.4.*
dependency-version: lowest
- php-version: '8.4'
symfony-version: 8.0.*
- php-version: '8.5'
symfony-version: 7.4.*
- php-version: '8.5'
symfony-version: 8.0.*
# Windows
- php-version: '8.4'
symfony-version: 7.4.*
os: windows-latest
- php-version: '8.5'
symfony-version: 8.1.*
os: windows-latest
env:
# symfony/flex (installed as a global tool below) reads SYMFONY_REQUIRE and forces every
# symfony/* package to this version during the Composer resolution.
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php-version }}
tools: flex
- name: Install dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
dependency-versions: ${{ matrix.dependency-version == 'lowest' && 'lowest' || 'highest' }}
composer-options: --prefer-dist
custom-cache-suffix: ${{ matrix.symfony-version }}
- name: PHPUnit
run: vendor/bin/phpunit
e2e:
name: E2E ${{ matrix.name }}
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- {
name: 'Vite 7 · Symfony 7.4',
id: vite7-sf74,
symfony-version: 7.4.*,
bundler: vite,
add: 'vite@^7 @vitejs/plugin-react@^5',
}
- {
name: 'Vite 7 · Symfony 8.1',
id: vite7-sf81,
symfony-version: 8.1.*,
bundler: vite,
add: 'vite@^7 @vitejs/plugin-react@^5',
}
- {
name: 'Vite 8 · Symfony 7.4',
id: vite8-sf74,
symfony-version: 7.4.*,
bundler: vite,
add: 'vite@^8',
}
- {
name: 'Vite 8 · Symfony 8.1',
id: vite8-sf81,
symfony-version: 8.1.*,
bundler: vite,
add: 'vite@^8',
}
- { name: 'Rsbuild · Symfony 7.4', id: rsbuild-sf74, symfony-version: 7.4.*, bundler: rsbuild }
- { name: 'Rsbuild · Symfony 8.1', id: rsbuild-sf81, symfony-version: 8.1.*, bundler: rsbuild }
env:
# symfony/flex forces every symfony/* package to this line during the Composer resolution.
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
E2E_BUNDLER: ${{ matrix.bundler }}
E2E_ARTIFACTS: '1'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.4'
tools: flex, symfony-cli
- name: Install PHP dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
working-directory: playground
dependency-versions: highest
composer-options: --prefer-dist
custom-cache-suffix: ${{ matrix.symfony-version }}
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Set node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install JS dependencies
run: pnpm install --frozen-lockfile
- name: Pin ${{ matrix.name }}
if: matrix.add
run: pnpm -C playground add -D ${{ matrix.add }}
- name: Build Reprise
run: pnpm build
- name: Cache Playwright browsers
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/ms-playwright
key: playwright-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Playwright Chromium
run: pnpm -C playground exec playwright install --with-deps chromium
- name: E2E
run: pnpm -C playground run test:e2e
- name: Upload Playwright artifacts
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: e2e-artifacts-${{ matrix.id }}
path: playground/tests/e2e/artifacts/
if-no-files-found: ignore
retention-days: 7
php-qa:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.4'
tools: composer:v2
- name: Validate composer.json
run: composer validate --strict
- name: Install dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
dependency-versions: highest
composer-options: --prefer-dist
- name: PHPStan
run: vendor/bin/phpstan analyse
- name: PHP-CS-Fixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff
- name: Analyse Composer dependencies
run: vendor/bin/composer-dependency-analyser