fix(build): seed the mock estate before the Lighthouse audit
The audit's URLs are mostly data views - tables, view/data, the review lists, excel-maps, multi-load - and the job deployed the services without the database behind them. makedata builds what a real deployment builds, createdemodata adds the Cypress fixtures (TESTDATA, the search and wide viewers, the multi-load library), and both run here before lhci, exactly as the Cypress job runs them. makedata's payload asks for OUTFMT=JSON, so a failed seed fails the job instead of auditing an empty estate.
This commit is contained in:
1 parent
77453a5c05
commit
3c2cb267d2
1 file changed
+12
@@ -724,7 +724,19 @@ jobs:
|
||||
run: |
|
||||
test -f client/dist/index.html || { echo "the artifact carries no client/dist/index.html"; ls -la client/dist; exit 1; }
|
||||
cd sas/mocks/sasjs
|
||||
# This server is fresh in this container, so there is no previous
|
||||
# deployment to delete - cbd is the first thing to write the appLoc.
|
||||
sasjs cbd -t server-ci
|
||||
# Seed the DC database and the Cypress fixtures, exactly as the Cypress
|
||||
# job does: most audited routes are data views (tables, view/data, the
|
||||
# review lists, excel-maps, multi-load), and an unseeded estate renders
|
||||
# empty or error states instead of the app users get. The payload asks
|
||||
# for OUTFMT=JSON so a failed seed fails this job; createdemodata runs
|
||||
# after it because it needs the control library makedata creates.
|
||||
# NOTE: -d paths resolve from the sasjs project root (sas/mocks), not
|
||||
# the cwd (sas/mocks/sasjs).
|
||||
sasjs request services/admin/makedata -t server-ci -d deploy/makedata.json -o ./makedata_out.json
|
||||
sasjs request services/admin/createdemodata -t server-ci -o ./createdemodata_out.json
|
||||
|
||||
- name: Run Lighthouse CI
|
||||
if: steps.changes.outputs.client != 'false'
|
||||
|
||||
Reference in new issue
Block a user