Skip to content

ci: run python tests on pull requests and main#176

Merged
dextmorgn merged 7 commits into
mainfrom
ci/python-tests
Jun 5, 2026
Merged

ci: run python tests on pull requests and main#176
dextmorgn merged 7 commits into
mainfrom
ci/python-tests

Conversation

@dextmorgn

Copy link
Copy Markdown
Collaborator

What

New tests.yml workflow: runs the Python test suites on every PR and push to main.

How

One step, one source of truth: CI calls make test — exactly what runs locally. No duplicated pytest commands to drift out of sync.

  • astral-sh/setup-uv installs uv, picks Python from .python-version (3.12), caches on uv.lock
  • Concurrency group cancels superseded runs on the same ref
  • No infra services needed: all four suites are mocked/self-contained (verified locally with unreachable DATABASE_URL/REDIS_URL/NEO4J_URI_BOLT — 458 tests pass)

Also

make test now includes flowsint-api — its test suite (6 tests) existed but was never wired into the target.

Verification

make test locally: 44 + 396 + 12 + 6 = 458 passed, exit 0.

This PR's checks are the live proof.

dextmorgn added 7 commits June 5, 2026 14:24
Single entrypoint: CI calls `make test`, same as local development,
so the two can't drift. uv handles Python (.python-version) and
dependency sync; cache keyed on uv.lock.

Also add flowsint-api to `make test` — its suite existed but was
never wired in.
flowsint_core imports yaml (template_generator_service, yaml_loader)
but never declared it — present locally only as a leftover in the
shared venv. CI's clean resolve exposed the missing declaration.
Neo4jGraphRepository(neo4j_connection=None) falls back to the
Neo4jConnection singleton, which requires NEO4J_* env vars — the test
only passed locally thanks to .env. Pass a mock instead; the test
nulls _connection right after anyway.
Previous fix covered one occurrence; 17 other tests built
Neo4jGraphRepository(neo4j_connection=None), hitting the singleton
fallback that requires NEO4J_* env vars. Single helper, no env
dependency left.
Any code path reaching the Neo4jConnection singleton requires NEO4J_*
env vars at construction — tests only passed thanks to developers'
local .env files. Driver creation is lazy, nothing connects.

Verified by running all four suites with every .env removed:
458 passed.
@dextmorgn dextmorgn merged commit 12bf293 into main Jun 5, 2026
5 checks passed
@dextmorgn dextmorgn deleted the ci/python-tests branch June 5, 2026 13:47
xenosnikos pushed a commit to xenosnikos/flowsint that referenced this pull request Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant