Implement Mock JavaScript Tool Bundle #11
Workflow file for this run
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/CD Pipeline | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: Test & Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 8 | |
| - name: Install dependencies | |
| run: | | |
| cd client | |
| pnpm install --frozen-lockfile | |
| - name: Generate types | |
| run: | | |
| cd client | |
| pnpm generate-types | |
| - name: Lint code | |
| run: | | |
| cd client | |
| pnpm lint | |
| - name: Type check | |
| run: | | |
| cd client | |
| pnpm typecheck | |
| - name: Run unit tests | |
| run: | | |
| cd client | |
| pnpm test:coverage | |
| - name: Build project | |
| run: | | |
| cd client | |
| pnpm build | |
| - name: Upload test coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: client/coverage/ | |
| retention-days: 30 | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| path: client/dist/ | |
| retention-days: 7 | |
| e2e: | |
| name: E2E Tests | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 8 | |
| - name: Install dependencies | |
| run: | | |
| cd client | |
| pnpm install --frozen-lockfile | |
| - name: Install Playwright browsers | |
| run: | | |
| cd client | |
| npx playwright install --with-deps | |
| - name: Generate types | |
| run: | | |
| cd client | |
| pnpm generate-types | |
| - name: Build project | |
| run: | | |
| cd client | |
| pnpm build | |
| - name: Run Playwright tests | |
| run: | | |
| cd client | |
| pnpm test:e2e | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: client/playwright-report/ | |
| retention-days: 30 |