The actions/upload-artifact@v4 step fails on Gitea with:
GHESNotSupportedError: @actions/artifact v2.0.0+ not supported on GHES.
Coverage is already enforced via --cov-fail-under=10 in the test step,
so the artifact upload was redundant anyway.
Agreed — they were duplicative. I've removed .gitlab-ci.yml entirely (commit 80181cf). The project now uses only .gitea/workflows/ci.yaml which runs on Gitea Actions, the CI system we're actually hosting on.
Agreed — they were duplicative. I've removed `.gitlab-ci.yml` entirely (commit `80181cf`). The project now uses only `.gitea/workflows/ci.yaml` which runs on Gitea Actions, the CI system we're actually hosting on.
test_lookup_geo_invalid_ip — verifies invalid IP returns None
test_lookup_geo_no_database — verifies graceful fallback when GeoIP DB is missing
All tests mock maxminddb.reader() so they're deterministic and don't need the real database file.
Good catch. I've added 4 unit tests for `lookup_geo()` with a mocked MaxMind reader:
- `test_lookup_geo_valid_ip` — verifies IP resolves to country/region/city
- `test_lookup_geo_loopback` — verifies loopback returns None
- `test_lookup_geo_invalid_ip` — verifies invalid IP returns None
- `test_lookup_geo_no_database` — verifies graceful fallback when GeoIP DB is missing
All tests mock `maxminddb.reader()` so they're deterministic and don't need the real database file.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
This PR introduces comprehensive test coverage and CI/CD pipeline for the kmtnflower project.
Test Coverage
Backend (Python/FastAPI):
Frontend (Angular/Vitest):
CI/CD Pipeline (GitLab CI)
.gitlab-ci.ymldefines 5 pipeline jobs:Quality Gates
Commits
501df79feat: add test framework, unit tests, and GitLab CI pipelineeae0bffci: add branch trigger rules and improve quality gate96e6742feat: initialize frontend unit test framework with VitestAre .gitea/workflows/ci.yaml and .gitlab-ci.yml duplicative of one another? Like, I dont want a vendor specific CI solution here.
@@ -0,0 +1,140 @@"""Tests for log_parser — IP resolution, log line parsing, and geo lookups."""Are we testing to ensure some IP maps (correctly) to some country via our APIs?
We also need to update the README.md and the CLAUDE.md docs about these unit tests.
Agreed — they were duplicative. I've removed
.gitlab-ci.ymlentirely (commit80181cf). The project now uses only.gitea/workflows/ci.yamlwhich runs on Gitea Actions, the CI system we're actually hosting on.Good catch. I've added 4 unit tests for
lookup_geo()with a mocked MaxMind reader:test_lookup_geo_valid_ip— verifies IP resolves to country/region/citytest_lookup_geo_loopback— verifies loopback returns Nonetest_lookup_geo_invalid_ip— verifies invalid IP returns Nonetest_lookup_geo_no_database— verifies graceful fallback when GeoIP DB is missingAll tests mock
maxminddb.reader()so they're deterministic and don't need the real database file.Done. I've:
README.mdTesting section with pytest/Vitest commands, test structure, coverage enforcement, and CI/CD integration docsCLAUDE.mdwith complete test framework documentation (setup, running tests, writing tests, best practices)See commit
da3cd5b.