name: Quality Checks on: push: branches: [ main, development, 'feature/**' ] pull_request: branches: [ main, development ] jobs: backend-quality: name: Backend (Go) runs-on: ubuntu-latest steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - name: Set up Go uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 with: go-version: '1.25.4' cache-dependency-path: backend/go.sum - name: Run Go tests id: 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: Go Test Summary if: always() working-directory: backend run: | echo "## 🔧 Backend Test Results" >> $GITHUB_STEP_SUMMARY if [ "${{ steps.go-tests.outcome }}" == "success" ]; then echo "✅ **All tests passed**" >> $GITHUB_STEP_SUMMARY PASS_COUNT=$(grep -c "^--- PASS" test-output.txt || echo "0") echo "- Tests passed: $PASS_COUNT" >> $GITHUB_STEP_SUMMARY else echo "❌ **Tests failed**" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "### Failed Tests:" >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY grep -E "^--- FAIL|FAIL\s+github" test-output.txt || echo "See logs for details" grep -E "^--- FAIL|FAIL\s+github" test-output.txt >> $GITHUB_STEP_SUMMARY || echo "See logs for details" >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY fi # Codecov upload moved to `codecov-upload.yml` which is push-only. - name: Run golangci-lint uses: golangci/golangci-lint-action@e7fa5ac41e1cf5b7d48e45e42232ce7ada589601 # v9.1.0 with: version: latest working-directory: backend args: --timeout=5m continue-on-error: true frontend-quality: name: Frontend (React) runs-on: ubuntu-latest steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - name: Set up Node.js uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 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 id: frontend-tests working-directory: ${{ github.workspace }} run: | bash scripts/frontend-test-coverage.sh 2>&1 | tee frontend/test-output.txt exit ${PIPESTATUS[0]} - name: Frontend Test Summary if: always() working-directory: frontend run: | echo "## ⚛️ Frontend Test Results" >> $GITHUB_STEP_SUMMARY if [ "${{ steps.frontend-tests.outcome }}" == "success" ]; then echo "✅ **All tests passed**" >> $GITHUB_STEP_SUMMARY # Extract test counts from vitest output if grep -q "Tests:" test-output.txt; then grep "Tests:" test-output.txt | tail -1 >> $GITHUB_STEP_SUMMARY fi else echo "❌ **Tests failed**" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "### Failed Tests:" >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY # Extract failed test info from vitest output grep -E "FAIL|✕|×|AssertionError|Error:" test-output.txt | head -30 >> $GITHUB_STEP_SUMMARY || echo "See logs for details" >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY fi # Codecov upload moved to `codecov-upload.yml` which is push-only. - name: Run frontend lint working-directory: frontend run: npm run lint continue-on-error: true