Node.js CI - Frontend #328
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: Node.js CI - Frontend | |
| on: | |
| push: | |
| branches: [main, dev] | |
| paths: | |
| - 'apps/frontend/**' # any file under frontend | |
| pull_request: | |
| branches: [main, dev] | |
| paths: | |
| - 'apps/frontend/**' # any file under frontend | |
| workflow_dispatch: | |
| # Cancel previous runs when a new one is triggered (same branch/PR) | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup Node.js 24.x | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| cache: npm | |
| - name: Verify Node.js version | |
| run: node -v | |
| - name: Verify Npm version | |
| run: npm -v | |
| - name: Install dependencies | |
| run: npm ci --no-fund --no-audit | |
| working-directory: apps/frontend | |
| - name: Check format of the project | |
| run: npm run format:check | |
| working-directory: apps/frontend | |
| - name: Lint the project | |
| run: npm run lint | |
| working-directory: apps/frontend | |
| - name: Build the project | |
| run: npm run build | |
| working-directory: apps/frontend | |
| - name: Test the project | |
| run: npm run test -- --testTimeout=30000 | |
| working-directory: apps/frontend | |
| - name: List, audit, fix outdated dependencies, update and build again | |
| run: | | |
| npm outdated || true | |
| npm audit || true | |
| npm audit fix || true | |
| npm update || true | |
| npm outdated || true | |
| npm audit || true | |
| npm run lint || true | |
| npm run build || true | |
| npm run test -- --testTimeout=30000 || true | |
| working-directory: apps/frontend |