fix(frontend): resolve badge sizing, os detection, duplicate mirrors,… #80
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Fail the whole run if any job fails, and don't queue duplicate runs. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| secrets: | |
| name: Secret scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # gitleaks needs full history to scan commits, not just the tip. | |
| fetch-depth: 0 | |
| - name: Install Gitleaks | |
| run: | | |
| curl -sSL -o /tmp/gitleaks.tar.gz https://github.com/gitleaks/gitleaks/releases/download/v8.24.0/gitleaks_8.24.0_linux_x64.tar.gz | |
| tar -xzf /tmp/gitleaks.tar.gz -C /tmp gitleaks | |
| sudo mv /tmp/gitleaks /usr/local/bin/gitleaks | |
| - name: Scan working tree and full history for secrets | |
| run: gitleaks detect --source . --verbose --redact | |
| backend: | |
| name: Backend (lint, typecheck, test) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: backend/package-lock.json | |
| - run: npm ci | |
| - run: npx tsc --noEmit | |
| - run: npm test | |
| frontend: | |
| name: Frontend (public site) (lint, typecheck, test, build) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npx tsc -b --noEmit | |
| - run: npm test | |
| - run: npm run build | |
| env: | |
| VITE_API_URL: https://dzd-api.demonzdevelopment.workers.dev/api | |
| admin-frontend: | |
| name: Admin Panel (lint, typecheck, test, build) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: admin-frontend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: admin-frontend/package-lock.json | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npx tsc -b --noEmit | |
| - run: npm test | |
| - run: npm run build | |
| env: | |
| VITE_API_URL: https://dzd-api.demonzdevelopment.workers.dev/api |