@@ -154,7 +154,6 @@ jobs:
154
154
- name : External, from "npm add"
155
155
ux-packages-source : js-packages
156
156
steps :
157
- # Setup
158
157
- uses : actions/checkout@v4
159
158
160
159
- run : corepack enable
@@ -179,12 +178,22 @@ jobs:
179
178
run : php .github/build-packages.php
180
179
working-directory : ${{ github.workspace }}
181
180
181
+ # We always install PHP deps because we of the UX Translator, which requires `var/translations` to exists
182
182
- uses : ramsey/composer-install@v3
183
183
with :
184
184
dependency-versions : ' highest'
185
185
working-directory : test_apps/encore-app
186
186
187
+ - if : matrix.ux-packages-source == 'php-vendor'
188
+ name : Refresh dependencies from vendor/
189
+ working-directory : test_apps/encore-app
190
+ run : yarn
191
+ env :
192
+ YARN_ENABLE_HARDENED_MODE : 0
193
+ YARN_ENABLE_IMMUTABLE_INSTALLS : 0
194
+
187
195
- if : matrix.ux-packages-source == 'js-packages'
196
+ name : Install UX JS packages with a JS package manager
188
197
working-directory : test_apps/encore-app
189
198
run : |
190
199
PACKAGES_TO_INSTALL=''
@@ -195,7 +204,6 @@ jobs:
195
204
echo "Installing packages: $PACKAGES_TO_INSTALL"
196
205
yarn add --dev $PACKAGES_TO_INSTALL
197
206
198
- # Validations
199
207
- name : Ensure UX packages are installed from "${{ matrix.ux-packages-source == 'php-vendor' && 'vendor/symfony/ux-...' || '../../../src/**/assets' }}"
200
208
working-directory : test_apps/encore-app
201
209
run : |
@@ -215,9 +223,10 @@ jobs:
215
223
env :
216
224
EXPECTED_PATTERN : ${{ matrix.ux-packages-source == 'php-vendor' && 'file:vendor/symfony/*' || '../../src/*' }}
217
225
218
- - name : Run Encore
226
+ - name : Run Encore (dev)
219
227
working-directory : test_apps/encore-app
220
- run : |
221
- YARN_ENABLE_HARDENED_MODE=0 YARN_ENABLE_IMMUTABLE_INSTALLS=0 yarn || (echo "Unable to install Yarn dependencies" && exit 1)
222
- yarn encore dev || (echo "Unable to build Encore assets (dev)" && exit 1)
223
- yarn encore production || (echo "Unable to build Encore assets (production)" && exit 1)
228
+ run : yarn encore dev
229
+
230
+ - name : Run Encore (prod)
231
+ working-directory : test_apps/encore-app
232
+ run : yarn encore production
0 commit comments