Controls Hub #3382
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 Checks | |
| permissions: | |
| contents: read | |
| security-events: write | |
| on: | |
| pull_request: | |
| branches: ['master', 'develop'] | |
| paths: | |
| - 'Clients/**' | |
| push: | |
| branches: ['master', 'develop'] | |
| paths: | |
| - 'Clients/**' | |
| jobs: | |
| security-audit: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: Clients | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| - name: Run npm audit | |
| run: npm audit --audit-level=high | |
| continue-on-error: true | |
| - name: Run npm audit (JSON output for review) | |
| run: npm audit --json > ../audit-results.json || true | |
| - name: Upload audit results | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: frontend-npm-audit-results | |
| path: audit-results.json | |
| retention-days: 30 | |
| unit-and-component-tests: | |
| name: Unit & Component Tests | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: Clients | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| - name: Run tests with coverage | |
| run: npx vitest run --coverage | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: frontend-coverage-report | |
| path: Clients/coverage/ | |
| retention-days: 14 | |
| dependency-review: | |
| name: Dependency Review | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Dependency Review | |
| uses: actions/dependency-review-action@v4 | |
| continue-on-error: true | |
| with: | |
| fail-on-severity: high | |
| deny-licenses: GPL-3.0, AGPL-3.0 |