Add CI workflow and infra-free unit-test tier - #439
Merged
Merged
Conversation
There was no CI in the repo; all existing tests require live infrastructure (Kafka/Postgres/Neo4j/Schema Registry), so nothing ran on a pull request. - Add a GitHub Actions workflow (.github/workflows/ci.yml) that installs the package + pytest on Python 3.12/3.13, byte-compiles fabric_cf, runs the unit tier with -m 'not integration', and runs pip-audit (advisory). - Add fabric_cf/actor/test/unit/ with mocked unit tests for PdpAuth.check_access (disabled path, permit, deny, non-JSON, HTTP error) that need no infrastructure. - Register the 'integration' pytest marker in pyproject so infra tests can be marked and excluded from the unit tier.
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The repo had no CI, and every existing test requires live infrastructure (Kafka/Postgres/Neo4j/Schema Registry), so nothing ran on a pull request. This adds automated checks plus the first tier of infrastructure-free tests.
Changes
.github/workflows/ci.yml— runs on PRs and pushes tomain/rel-2.0.1:pip install . pytest, byte-compilefabric_cf, runpytest fabric_cf/actor/test/unit -m "not integration".continue-on-error): dependency vulnerability scan.fabric_cf/actor/test/unit/— new unit-test tier that mocks all external dependencies (no infra needed). First tests coverPdpAuth.check_access: disabled-path short-circuit, permit, deny (with reason), non-JSON response, and wrapped HTTP error.pyproject.toml— register theintegrationpytest marker so infra-dependent tests can be marked and excluded from the unit tier.Verification
pytest fabric_cf/actor/test/unit -m "not integration"→ 6 passed locally, no marker warnings.pip install .) rather than the[test]extra, which still pins the unmaintainednose.Targets
rel-2.0.1(theme 5 of the improvement sweep). This gives the otherrel-2.0.1PRs an automated check to run against.Follow-ups (separate PRs)
@pytest.mark.integrationand add a compose-backed integration job.token_validator, allocation helpers).