Skip to content

Conversation

@pyramation
Copy link
Contributor

@pyramation pyramation commented Jan 21, 2026

Summary

Adds CI/CD infrastructure for the pysql-test framework:

  1. GitHub Actions workflow (.github/workflows/test.yml) that runs on push/PR to main and develop:

    • Uses ghcr.io/constructive-io/docker/postgres-plus:17 image (matches constructive repo pattern)
    • Installs Python 3.12 and Poetry
    • Runs ruff linting, mypy type checking, and pytest
    • Includes concurrency settings to cancel in-progress runs
    • Supports manual workflow dispatch
  2. Simple example test (tests/test_example.py) demonstrating framework usage:

    • Shows how to create an isolated test database with seeding
    • Demonstrates before_each()/after_each() transaction isolation
    • Includes 3 tests that verify data is rolled back between tests

Review & Testing Checklist for Human

  • Verify the ghcr.io/constructive-io/docker/postgres-plus:17 image is accessible and contains expected PostgreSQL extensions
  • Verify the snok/install-poetry@v1 action is acceptable for your CI environment
  • Check that the example test in test_empty_table_after_rollback correctly demonstrates rollback (it depends on running after test_transaction_isolation - pytest may not guarantee order)
  • Confirm CI passes on this PR - CI is now passing

Test plan: Merge this PR and verify the GitHub Actions workflow runs successfully on the merge commit to main.

Updates since last revision

  • Switched from postgres:17 to ghcr.io/constructive-io/docker/postgres-plus:17 to match constructive repo pattern
  • Added concurrency settings to cancel in-progress runs on same branch
  • Added workflow_dispatch for manual triggers
  • Added develop branch to push/PR triggers

Notes

  • All 24 tests (21 existing + 3 new example tests) pass locally and in CI
  • The example test serves as both documentation and a smoke test for CI

Link to Devin run: https://app.devin.ai/sessions/1203eea9373240d797329ae288ab6dd7
Requested by: Dan Lynch (@pyramation)

- Add test.yml workflow that runs on push/PR to main
- Uses PostgreSQL 17 service container
- Runs ruff linting, mypy type checking, and pytest
- Add simple example test demonstrating framework usage
- Example shows transaction isolation between tests
@devin-ai-integration
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

- Switch to ghcr.io/constructive-io/docker/postgres-plus:17 image
- Add concurrency settings to cancel in-progress runs
- Add workflow_dispatch for manual triggers
- Add develop branch to triggers
- Update password to match constructive pattern
- Move env vars to job level
@pyramation pyramation merged commit 33f4c68 into main Jan 22, 2026
1 check passed
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.

2 participants