ci: web checks run the component and browser e2e suites #73
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Web Checks | |
| # Type-checks the Nuxt frontend, runs the API-contract test, the component suite, and the browser | |
| # e2e golden flows against the built app. Together they guard against frontend/backend drift and | |
| # behavioural regressions that are invisible to `nuxt build`. | |
| # Triggered by web changes and by changes to the OpenAPI spec the client is generated from. | |
| on: | |
| push: | |
| paths: | |
| - "web/**" | |
| - "api/API/openapi/API_v2.json" | |
| - ".github/workflows/web-tests.yml" | |
| workflow_dispatch: | |
| jobs: | |
| web: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./web/website | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: "npm" | |
| cache-dependency-path: web/website/package-lock.json | |
| # postinstall runs `nuxt prepare`, generating the typed API client from | |
| # ../../api/API/openapi/API_v2.json (present in the checkout). | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type-check | |
| run: npm run typecheck | |
| - name: API contract test | |
| run: npm test | |
| - name: Component tests | |
| run: npm run test:component | |
| - name: Build app for e2e | |
| run: npm run build | |
| - name: Install Playwright browser | |
| run: npx playwright install --with-deps chromium | |
| - name: Browser e2e flows | |
| run: npm run test:e2e |