Skip to content

Features batch 3: bulk-write audit, worker images, server head, SPA mounts, resource access (#557 #540 #535 #541 #526) #15

Features batch 3: bulk-write audit, worker images, server head, SPA mounts, resource access (#557 #540 #535 #541 #526)

Features batch 3: bulk-write audit, worker images, server head, SPA mounts, resource access (#557 #540 #535 #541 #526) #15

Workflow file for this run

name: Postgres tests
# The full Python suite on Postgres (`make test-py-pg`), including the
# `@pytest.mark.postgres` tests that SQLite cannot run. Slow and serial (every
# test resets one database), so it is not part of the PR aggregate: it runs
# nightly, on demand, and on PRs that touch the database/tenancy layers (#508).
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
pull_request:
branches: [main]
paths:
- "framework/db/**"
- "framework/testing/**"
- "modules/tenants/**"
- "host/migrations/**"
- ".github/workflows/postgres-tests.yml"
concurrency:
group: pg-tests-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
UV_SYNC_FLAGS: --locked
UV_CACHE_GLOB: |
uv.lock
pyproject.toml
framework/*/pyproject.toml
modules/*/pyproject.toml
host/pyproject.toml
jobs:
python-tests-pg:
name: Python tests (Postgres)
runs-on: ubuntu-latest
timeout-minutes: 60
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: sm_test
ports: ["5432:5432"]
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 3s
--health-retries 10
# Same broker the python-tests job uses for the invalidation suite.
redis:
image: redis:7-alpine
ports: ["6379:6379"]
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 10
env:
SM_TEST_PG_URL: postgresql+asyncpg://postgres:postgres@localhost:5432/sm_test
SM_TEST_REDIS_URL: redis://127.0.0.1:6379/0
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v9.0.0
with:
enable-cache: true
cache-dependency-glob: ${{ env.UV_CACHE_GLOB }}
- run: make install-py
- run: make test-py-pg