The test pipeline in this project is configured to allow tests to fail without blocking the build process. This enables continuous development and deployment while tests are being fixed or during active development phases.
The workflow includes these steps with failure tolerance:
-
Linting -
continue-on-error: true- ESLint checks run but won't fail the build
- Warnings and errors are reported but don't block deployment
-
Testing -
continue-on-error: true- Jest tests run but won't fail the build
- Test failures are reported but don't block deployment
-
Build - Always runs regardless of test/lint status
- Ensures the application can still be built and deployed
npm test # Run tests normally (can fail)
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage reportnpm run test:ci # Run tests with CI optimizations
npm run test:optional # Run tests and continue even if they failpassWithNoTests: true- Allows pipeline to pass even with no testssilent: true(in CI) - Reduces verbose output in CI environmentmaxWorkers: 2(in CI) - Limits workers for better CI performance
CI: true- Enables CI-specific Jest behaviorcontinue-on-error: true- Allows steps to fail without stopping the workflow
✅ Good for:
- Active development phases
- Feature branches where tests are being written
- Experimental features
- When deploying despite some test failures
- Continuous deployment environments
❌ Consider stricter testing for:
- Production releases
- Main branch protection
- Critical bug fixes
- Final QA phases
To make tests mandatory again, remove continue-on-error: true from:
.github/workflows/test-and-lint.yml
Or use the standard test script:
npm test # Will fail the pipeline if tests failEven though tests are allowed to fail, you should still monitor:
- Test success rates in GitHub Actions
- Coverage reports
- Failing test patterns
- Performance degradation
When tests fail but are allowed to continue:
✅ Linting (with warnings)
⚠️ Tests (failed but continuing)
✅ Build (successful)
✅ Deploy (successful)
- Fix tests regularly - Don't let failures accumulate
- Monitor test trends - Watch for increasing failure rates
- Use feature flags - Isolate unstable features
- Communicate - Let team know about known test issues
- Temporary measure - Plan to return to strict testing
If you need to debug why tests are failing:
# Run tests locally with full output
npm test -- --verbose
# Run specific test files
npm test -- --testNamePattern="specific test"
# Run tests with coverage
npm run test:coverage.github/workflows/test-and-lint.yml- GitHub Actions workflowjest.config.js- Jest configurationpackage.json- Test scriptsjest.setup.js- Jest setup and globals