hotfix: run prisma generate before nuxt build #501
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| name: Lint & Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python | |
| run: uv python install 3.14.3 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| pnpm install | |
| - name: Check Python formatting & linting (ruff) | |
| run: | | |
| uv run ruff check scripts/ tests/ | |
| uv run ruff format --check scripts/ tests/ | |
| - name: Check TypeScript formatting (prettier) | |
| run: pnpm format:check | |
| python-tests: | |
| name: Python Tests (pytest) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python | |
| run: uv python install 3.14.3 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run pytest with coverage | |
| run: uv run pytest tests/ -v --tb=short | |
| typescript-tests: | |
| name: TypeScript Tests (vitest) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Generate Prisma client | |
| run: pnpm db:generate | |
| - name: Build Nuxt (pre-compiled server avoids 50s+ Nitro JIT) | |
| run: pnpm build | |
| - name: Run vitest | |
| run: pnpm test | |
| env: | |
| NUXT_USE_BUILD: '1' | |
| NUXT_SESSION_PASSWORD: 'ci-test-secret-min-32-chars-long!!' | |
| e2e: | |
| name: E2E Tests (Playwright) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Generate Prisma client | |
| run: pnpm db:generate | |
| - name: Build Nuxt | |
| run: pnpm build | |
| - name: Install Playwright browsers | |
| run: npx playwright install chromium --with-deps | |
| - name: Run Playwright E2E tests | |
| run: pnpm test:e2e | |
| env: | |
| NUXT_SESSION_PASSWORD: 'ci-test-secret-min-32-chars-long!!' | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 14 | |
| build: | |
| name: Build Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Generate Prisma client | |
| run: pnpm db:generate | |
| - name: Build | |
| run: pnpm build |