Move to MUI #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: Tests & Coverage | |
| on: | |
| pull_request: | |
| branches: [ master, main, develop ] | |
| jobs: | |
| tests: | |
| name: Run Tests & Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.25' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: | | |
| go mod download | |
| cd frontend && npm ci | |
| - name: Run Go tests with coverage | |
| run: go test ./... -v -coverprofile=coverage.out -covermode=atomic | |
| - name: Debug test files | |
| working-directory: ./frontend | |
| run: | | |
| echo "=== Checking test files ===" | |
| find tests -name "*.spec.ts" -o -name "*.spec.tsx" | head -20 | |
| echo "=== Checking vitest config ===" | |
| cat vitest.config.ts | |
| echo "=== Checking package.json test scripts ===" | |
| grep -A5 -B5 "test:" package.json | |
| - name: Run frontend tests with coverage | |
| working-directory: ./frontend | |
| run: | | |
| export NODE_OPTIONS="--max-old-space-size=4096 --no-warnings" | |
| npm run test:coverage | |
| env: | |
| NODE_ENV: test | |
| VITEST_MAX_THREADS: 1 | |
| VITEST_MIN_THREADS: 1 | |
| CI: true | |
| - name: Upload Go coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./coverage.out | |
| flags: backend | |
| fail_ci_if_error: false | |
| verbose: true | |
| - name: Upload frontend coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| directory: ./frontend/coverage | |
| flags: frontend | |
| fail_ci_if_error: false | |
| verbose: true |