Svelte front end #99
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: Frontend Tests | |
| on: | |
| push: | |
| branches: [ master, main, svelte, fastapi ] | |
| paths: | |
| - 'frontend/**' | |
| - '.github/workflows/frontend-tests.yml' | |
| pull_request: | |
| branches: [ master, main, svelte, fastapi ] | |
| paths: | |
| - 'frontend/**' | |
| - '.github/workflows/frontend-tests.yml' | |
| jobs: | |
| test: | |
| name: Run Frontend Tests | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./frontend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: './frontend/package-lock.json' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run type checking | |
| run: npm run check | |
| - name: Run linting | |
| run: npm run lint | |
| - name: Run tests | |
| run: npm run test:run | |
| - name: Generate coverage report | |
| run: npm run test:coverage | |
| - name: Comment PR with coverage | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| recreate: true | |
| path: frontend/coverage/coverage-summary.json |