Files
ackify-ce/.github/workflows/coverage-report.yml
Benjamin a7891618c1 feat: comprehensive CI/CD refactoring with unified code coverage
Reorganize GitHub Actions workflows into reusable components and implement
complete code coverage tracking across backend, frontend, and E2E tests.

**CI/CD Improvements:**
- Split monolithic ci.yml into 6 specialized reusable workflows
- New workflows: test-backend, test-frontend, test-e2e, build-docker, security, coverage-report
- Orchestrated execution with proper dependencies and parallel jobs
- Codecov integration with multi-flag coverage (backend/frontend/e2e)

**Frontend Testing:**
- Add Vitest for unit testing with coverage-v8 provider
- Create test setup with window mocks for Ackify globals
- Add 34 unit tests for titleExtractor, referenceDetector, and http utils
- Configure Istanbul instrumentation for E2E coverage collection
- Integrate @cypress/code-coverage for E2E test coverage

**Test Infrastructure:**
- Create run-tests-suite.sh for local comprehensive test execution
- Proper Docker Compose orchestration for integration and E2E tests
- Automatic cleanup handlers with trap for test environments
- Coverage summary aggregation across all test types

**Bug Fixes:**
- Fix backend config tests after OAuth/MagicLink validation changes
- Update tests from panic expectations to error checking
- Ensure OAUTH_COOKIE_SECRET is properly configured in tests

**Configuration:**
- Add .codecov.yml for coverage reporting with flags
- Add .nycrc.json for E2E LCOV generation
- Update .gitignore for test artifacts and coverage reports
- Configure Vite for test environment and code instrumentation
2025-11-23 23:36:02 +01:00

58 lines
1.7 KiB
YAML

name: Coverage Report
on:
workflow_call:
jobs:
merge-and-upload:
name: Merge Coverage & Upload to Codecov
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download backend coverage
uses: actions/download-artifact@v4
with:
name: backend-coverage
path: coverage/backend
- name: Download frontend coverage
uses: actions/download-artifact@v4
with:
name: frontend-coverage
path: coverage/frontend
continue-on-error: true
- name: Download E2E coverage
uses: actions/download-artifact@v4
with:
name: e2e-coverage
path: coverage/e2e
continue-on-error: true
- name: Upload to Codecov (multi-format)
uses: codecov/codecov-action@v4
with:
files: |
coverage/backend/coverage.out
coverage/frontend/lcov.info
coverage/e2e/lcov.info
flags: backend,frontend,e2e
name: codecov-ackify-ce
fail_ci_if_error: false
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Generate coverage summary
run: |
echo "## 📊 Code Coverage Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Coverage reports uploaded to Codecov:" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Backend (Go): coverage/backend/coverage.out" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Frontend (Vue/TS): coverage/frontend/lcov.info" >> $GITHUB_STEP_SUMMARY
echo "- ✅ E2E (Cypress): coverage/e2e/lcov.info" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "View detailed report: https://codecov.io/gh/${{ github.repository }}" >> $GITHUB_STEP_SUMMARY