Fixes linting #3
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 Build and Test | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'frontend/**' | |
| - '.github/workflows/frontend.yml' | |
| pull_request: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'frontend/**' | |
| - '.github/workflows/frontend.yml' | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| working-directory: ./frontend | |
| run: npm ci | |
| - name: Type check | |
| working-directory: ./frontend | |
| run: npm run typecheck | |
| - name: Lint code | |
| working-directory: ./frontend | |
| run: npm run lint -- --format=compact | |
| - name: Build project | |
| working-directory: ./frontend | |
| run: npm run build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: frontend-dist | |
| path: frontend/dist/ | |
| retention-days: 7 |