diff --git a/.github/workflows/codecov-upload.yml b/.github/workflows/codecov-upload.yml new file mode 100644 index 00000000..a2d040af --- /dev/null +++ b/.github/workflows/codecov-upload.yml @@ -0,0 +1,77 @@ +name: Upload Coverage to Codecov (Push only) + +on: + push: + branches: + - main + - development + - 'feature/**' + +permissions: + contents: read + +jobs: + backend-codecov: + name: Backend Codecov Upload + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.25.4' + cache-dependency-path: backend/go.sum + + - name: Run Go tests + working-directory: backend + env: + CGO_ENABLED: 1 + run: | + go test -race -v -coverprofile=coverage.out ./... 2>&1 | tee test-output.txt + exit ${PIPESTATUS[0]} + + - name: Upload backend coverage to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./backend/coverage.out + flags: backend + fail_ci_if_error: true + + frontend-codecov: + name: Frontend Codecov Upload + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '24.11.1' + cache: 'npm' + cache-dependency-path: frontend/package-lock.json + + - name: Install dependencies + working-directory: frontend + run: npm ci + + - name: Run frontend tests and coverage + working-directory: ${{ github.workspace }} + run: | + bash scripts/frontend-test-coverage.sh 2>&1 | tee frontend/test-output.txt + exit ${PIPESTATUS[0]} + + - name: Upload frontend coverage to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + directory: ./frontend/coverage + flags: frontend + fail_ci_if_error: true diff --git a/.github/workflows/quality-checks.yml b/.github/workflows/quality-checks.yml index d32f3c1a..5321f811 100644 --- a/.github/workflows/quality-checks.yml +++ b/.github/workflows/quality-checks.yml @@ -47,13 +47,7 @@ jobs: echo '```' >> $GITHUB_STEP_SUMMARY fi - - name: Upload coverage to Codecov - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./backend/coverage.out - flags: backend - fail_ci_if_error: true + # Codecov upload moved to `codecov-upload.yml` which is push-only. - name: Enforce module-specific coverage (backend) working-directory: ${{ github.workspace }} @@ -113,13 +107,7 @@ jobs: echo '```' >> $GITHUB_STEP_SUMMARY fi - - name: Upload coverage to Codecov - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - directory: ./frontend/coverage - flags: frontend - fail_ci_if_error: true + # Codecov upload moved to `codecov-upload.yml` which is push-only. - name: Enforce module-specific coverage (frontend) working-directory: ${{ github.workspace }} diff --git a/.vscode/settings.json b/.vscode/settings.json index 4bbb4566..b0115ae0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,7 +11,30 @@ "buildFlags": ["-tags=ignore", "-mod=mod"], "env": { "GOWORK": "off", - "GOFLAGS": "-mod=mod" - } + "GOFLAGS": "-mod=mod", + "GOTOOLCHAIN": "none" + }, + "directoryFilters": [ + "-**/pkg/mod/**", + "-**/go/pkg/mod/**", + "-**/root/go/pkg/mod/**", + "-**/golang.org/toolchain@**" + ] + }, + "go.buildFlags": ["-tags=ignore", "-mod=mod"], + "go.toolsEnvVars": { + "GOWORK": "off", + "GOFLAGS": "-mod=mod", + "GOTOOLCHAIN": "none" + }, + "files.watcherExclude": { + "**/pkg/mod/**": true, + "**/go/pkg/mod/**": true, + "**/root/go/pkg/mod/**": true + }, + "search.exclude": { + "**/pkg/mod/**": true, + "**/go/pkg/mod/**": true, + "**/root/go/pkg/mod/**": true } } diff --git a/backend/caddy.html b/backend/caddy.html index 486354f7..5e6f89de 100644 --- a/backend/caddy.html +++ b/backend/caddy.html @@ -54,24 +54,24 @@
not tracked - + no coverage low coverage * @@ -83,11 +83,11 @@ * * high coverage - +
- + - + - + - + - + - + - +