Understanding CI Failures
CI failures aren't mysterious. Learn to read them.
Common CI Jobs
✓ Tests
✓ Linting
✓ Type Checking
✓ Coverage
✓ Performance Benchmarks
✓ Security ScanningReading Failure Output
JOB: Tests
FAILURE: Test 'get_user_by_id' failed
AssertionError: None != <User object>
File: tests/test_user_service.py:45
assert result == expected_user
The test expected result to be a User object,
but got None instead.What to do: Fix the code to return a User object.
Common Failures
| Error | Meaning | Fix |
|---|---|---|
| Test failed | Code broke expected behavior | Fix the code |
| Import error | Missing/wrong module | Check imports |
| Type error | Wrong data type | Fix types |
| Coverage dropped | Tests don't cover new code | Add tests |
| Lint failed | Code style violated | Run formatter |
Debugging CI
1. Read the exact error
2. Reproduce locally
3. Fix locally
4. Run tests locally
5. Push again
6. Watch CI passCI isn't the enemy. It's your safety net. Fix CI failures aggressively.