Launch Cloudflare-backed StudyInChina data platform #16
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quality: | |
| name: Lint, test, validate, and build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| env: | |
| CI: "true" | |
| NEXT_TELEMETRY_DISABLED: "1" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Use Node.js 24 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Type-check | |
| run: npm run typecheck | |
| - name: Run unit tests | |
| run: npm run test | |
| - name: Validate content data | |
| run: npm run validate:data | |
| - name: Validate D1 migrations and database integrity | |
| run: npm run validate:d1 | |
| - name: Validate pilot source manifests | |
| run: npm run validate:manifests | |
| - name: Run ingestion Worker tests | |
| run: npm run test:ingestion | |
| - name: Run publisher Worker tests | |
| run: npm run test:publisher | |
| - name: Run release builder Worker tests | |
| run: npm run test:release-builder | |
| - name: Validate ingestion Worker bundle and bindings | |
| run: npm run check:worker:ingestion | |
| - name: Validate publisher Worker bundle and bindings | |
| run: npm run check:worker:publisher | |
| - name: Validate release builder Worker bundle and bindings | |
| run: npm run check:worker:release-builder | |
| - name: Validate Catalog API Worker bundle and bindings | |
| run: npm run check:worker:catalog | |
| - name: Build production application | |
| run: npm run build | |
| - name: Install Playwright Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Run end-to-end tests against the production build | |
| run: npm run test:e2e |