diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef0d54e07..07cb1b13a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,6 +106,16 @@ jobs: - name: Install dependencies run: npm ci + # Sprint 2 design-system migrated to Style Dictionary; the + # generated tokens live in packages/design-system/dist/ which + # is gitignored. apps/web imports `@veza/design-system/tokens-generated`, + # so dist/ MUST exist before tsc/vitest/build runs. + # `prepare` in the package would normally cover npm ci, but + # this explicit step makes the dependency loud and runnable + # standalone for local debugging. + - name: Build design tokens + run: npm run build:tokens --workspace=@veza/design-system + # Prevents drift between veza-backend-api/openapi.yaml and # apps/web/src/types/generated/. Regenerates then fails if # git diff is non-empty. diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 4e6213b79..a3df8bfa9 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -107,6 +107,14 @@ jobs: - name: Install dependencies run: npm ci + # Sprint 2 design-system migrated to Style Dictionary; the + # generated tokens live in packages/design-system/dist/ + # (gitignored). The Playwright-spawned Vite imports them via + # `@veza/design-system/tokens-generated`, so dist/ MUST exist + # before vite starts. + - name: Build design tokens + run: npm run build:tokens --workspace=@veza/design-system + # Playwright tests reach the frontend via http://veza.fr:5174, # which the browsers resolve via /etc/hosts. Without this entry # the navigation step times out. diff --git a/packages/design-system/package.json b/packages/design-system/package.json index a526b34dd..0f02f6be4 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -17,7 +17,8 @@ ], "scripts": { "build": "node style-dictionary.config.mjs", - "build:tokens": "node style-dictionary.config.mjs" + "build:tokens": "node style-dictionary.config.mjs", + "prepare": "node style-dictionary.config.mjs" }, "devDependencies": { "style-dictionary": "^4.4.0"