This PR resolves four CI/CD and infrastructure issues:
- Issue #897 [CI] Frontend tests run without coverage and are never uploaded to Codecov: Added frontend test coverage to CI workflow and configured Codecov to track frontend coverage.
- Issue #894 [Infra] No .dockerignore for the backend build context: Created
.dockerignorefor backend to exclude unnecessary files from Docker build context. - Issue #892 [CI] Workflows have no concurrency control: Added concurrency control to
ci.ymlandsecurity.ymlworkflows to cancel superseded runs. - Issue #891 [CI] pr-test-gate.yml fully duplicates ci.yml's backend and contracts jobs: Removed
pr-test-gate.ymlas it duplicates tests already covered byci.yml.
- 🔧 Infrastructure/CI improvements
- 🐛 Bug fix (non-breaking change which fixes an issue)
- ✨ New feature (non-breaking change which adds functionality)
- 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
- 📚 Documentation update
- ⚡ Performance improvement
- 🧪 Test addition or update
Closes #897 Closes #894 Closes #892 Closes #891
- Frontend Test Coverage (#897):
- Updated
.github/workflows/ci.ymlto runnpm run test:coverageinstead ofnpm testfor frontend - Added frontend coverage upload step to Codecov with
frontendflag - Updated
.github/codecov.ymlto include frontend project status withtarget: auto
- Updated
- Docker Build Optimization (#894):
- Created
backend/.dockerignoreto exclude:node_modules,dist,coverage,.env*,*.log,src/generated - This reduces Docker build context size and prevents secrets from being sent to build cache
- Created
- Concurrency Control (#892):
- Added
concurrencyblock to.github/workflows/ci.ymlwithcancel-in-progress: true - Added
concurrencyblock to.github/workflows/security.ymlwithcancel-in-progress: true - Both workflows use group:
${{ github.workflow }}-${{ github.ref }}
- Added
- Remove Duplicate Workflow (#891):
- Deleted
.github/workflows/pr-test-gate.ymlas it duplicated backend and contracts tests already inci.yml - This eliminates duplicate Postgres services and redundant test runs on PRs to main
- Deleted
- Unit tests added/updated
- Integration tests added/updated
- Manual testing performed
- Verify frontend tests run with coverage in CI by checking workflow logs
- Verify frontend coverage appears in Codecov dashboard
- Verify Docker build context size is reduced by checking build logs
- Verify concurrent workflow runs cancel previous runs by pushing multiple commits to same branch
- Verify PRs to main no longer launch duplicate Postgres services
None. Branch protection rules should be updated to point to ci.yml jobs instead of pr-test-gate.yml if they were previously configured.
- My code follows the project's style guidelines
- I have performed a self-review of my own code
- I have commented my code, particularly in hard-to-understand areas
- I have made corresponding changes to the documentation
- My changes generate no new warnings
- I have added tests that prove my fix is effective or that my feature works
- New and existing unit tests pass locally with my changes
- Any dependent changes have been merged and published
- I have checked for breaking changes and documented them if applicable
- Branch protection rules may need to be updated to reference
ci.ymljobs instead of the removedpr-test-gate.ymlworkflow - Frontend coverage threshold is set to
autoin Codecov to allow establishing a baseline before setting specific targets