refactor(gateway-arch): remove financial dispatch scope from operatio… #476
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 | |
| on: | |
| push: | |
| branches: [develop, main] | |
| paths: | |
| - 'frontend/**' | |
| - 'api/proto/**' | |
| - '.github/workflows/frontend.yml' | |
| pull_request: | |
| branches: [develop, main] | |
| paths: | |
| - 'frontend/**' | |
| - 'api/proto/**' | |
| - '.github/workflows/frontend.yml' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Frontend Tests & Coverage | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate protobuf TypeScript clients | |
| run: npm run generate | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Run tests with coverage | |
| run: npx vitest run --coverage --reporter=verbose | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-report | |
| path: frontend/coverage/ | |
| retention-days: 7 | |
| if-no-files-found: ignore | |
| - name: Check 80% line coverage threshold | |
| run: | | |
| node -e " | |
| const s = require('./coverage/coverage-summary.json'); | |
| const pct = s.total.lines.pct; | |
| console.log('Line coverage: ' + pct + '%'); | |
| if (pct < 80) { | |
| console.error('Coverage ' + pct + '% is below the 80% minimum threshold'); | |
| process.exit(1); | |
| } | |
| console.log('Coverage ' + pct + '% meets the 80% minimum threshold'); | |
| " | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate protobuf TypeScript clients | |
| run: npm run generate | |
| - name: Lint | |
| run: npm run lint |