From 02d2989bdc4a51a158c751a1ad8cb2099b899b8b Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Tue, 15 Sep 2026 16:15:33 +0300 Subject: [PATCH 1/2] ci: call the shared checks.yml instead of the local copy --- .github/workflows/_checks.yml | 79 --------------------------------- .github/workflows/ci.yml | 10 ++++- .github/workflows/scheduled.yml | 10 ++++- 3 files changed, 18 insertions(+), 81 deletions(-) delete mode 100644 .github/workflows/_checks.yml diff --git a/.github/workflows/_checks.yml b/.github/workflows/_checks.yml deleted file mode 100644 index 67626dd..0000000 --- a/.github/workflows/_checks.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: checks -on: - workflow_call: {} - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: extractions/setup-just@v4 - - uses: astral-sh/setup-uv@v8.2.0 - with: - enable-cache: true - cache-dependency-glob: "**/pyproject.toml" - - run: uv python install 3.13 - - run: uv python pin 3.13 - - run: just install lint-ci - - pytest: - runs-on: ubuntu-latest - env: - # SQLAlchemy's cyext does not declare free-thread safety (fixed upstream for 2.1): use the pure-Python fallback on the t build. - DISABLE_SQLALCHEMY_CEXT_RUNTIME: ${{ matrix.python-version == '3.14t' && '1' || '' }} - strategy: - fail-fast: false - matrix: - python-version: - - "3.11" - - "3.12" - - "3.13" - - "3.14" - - "3.14t" - services: - postgres: - image: postgres:latest - env: - POSTGRES_DB: postgres - POSTGRES_PASSWORD: password - POSTGRES_USER: postgres - ports: - - 5432:5432 - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - steps: - - uses: actions/checkout@v6 - - uses: extractions/setup-just@v4 - - uses: astral-sh/setup-uv@v8.2.0 - - run: uv python install ${{ matrix.python-version }} - - run: uv python pin ${{ matrix.python-version }} - - run: uv sync --all-extras --no-install-project - - name: Confirm the interpreter is free-threaded - if: matrix.python-version == '3.14t' - run: uv run --no-sync python -c "import sys, db_retry; assert not sys._is_gil_enabled(), 'GIL is enabled on a t-build'" - - run: just test-ci - env: - PYTHONDONTWRITEBYTECODE: 1 - PYTHONUNBUFFERED: 1 - DB_DSN: postgresql+asyncpg://postgres:password@127.0.0.1/postgres - - links: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - # --offline blocks network requests and excludes every external URL, so this gate - # is deterministic: it fails only on a relative link or file path a diff broke. - # Tag-pinned and cross-repo URLs do not match the --remap pattern and stay - # excluded: they point at trees this checkout does not have. - - name: Check local links - uses: lycheeverse/lychee-action@v2 - with: - args: >- - --offline - --no-progress - --remap - 'https://github\.com/${{ github.repository }}/(?:blob|tree)/main/(.*) file://${{ github.workspace }}/$1' - '**/*.md' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85af5ea..0bdcb71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,4 +11,12 @@ concurrency: jobs: checks: - uses: ./.github/workflows/_checks.yml + uses: modern-python/.github/.github/workflows/checks.yml@shared-checks + secrets: inherit + with: + service-image: postgres:latest + service-port: 5432:5432 + service-health-cmd: pg_isready + test-env: DB_DSN=postgresql+asyncpg://postgres:password@127.0.0.1/postgres + # SQLAlchemy's cyext does not declare free-thread safety (fixed upstream for 2.1): use the pure-Python fallback on the t build. + free-threaded-env: DISABLE_SQLALCHEMY_CEXT_RUNTIME=1 diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index b1fe433..73aead7 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -10,7 +10,15 @@ concurrency: jobs: checks: - uses: ./.github/workflows/_checks.yml + uses: modern-python/.github/.github/workflows/checks.yml@shared-checks + secrets: inherit + with: + service-image: postgres:latest + service-port: 5432:5432 + service-health-cmd: pg_isready + test-env: DB_DSN=postgresql+asyncpg://postgres:password@127.0.0.1/postgres + # SQLAlchemy's cyext does not declare free-thread safety (fixed upstream for 2.1): use the pure-Python fallback on the t build. + free-threaded-env: DISABLE_SQLALCHEMY_CEXT_RUNTIME=1 report-failure: needs: checks From daf0f8e4387e65613d6652d477c6be373ce3054b Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Tue, 15 Sep 2026 19:20:11 +0300 Subject: [PATCH 2/2] ci: pass the postgres password through service-options --- .github/workflows/ci.yml | 2 +- .github/workflows/scheduled.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bdcb71..2d8757d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: with: service-image: postgres:latest service-port: 5432:5432 - service-health-cmd: pg_isready + service-options: --health-cmd pg_isready -e POSTGRES_PASSWORD=password test-env: DB_DSN=postgresql+asyncpg://postgres:password@127.0.0.1/postgres # SQLAlchemy's cyext does not declare free-thread safety (fixed upstream for 2.1): use the pure-Python fallback on the t build. free-threaded-env: DISABLE_SQLALCHEMY_CEXT_RUNTIME=1 diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 73aead7..dc612e6 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -15,7 +15,7 @@ jobs: with: service-image: postgres:latest service-port: 5432:5432 - service-health-cmd: pg_isready + service-options: --health-cmd pg_isready -e POSTGRES_PASSWORD=password test-env: DB_DSN=postgresql+asyncpg://postgres:password@127.0.0.1/postgres # SQLAlchemy's cyext does not declare free-thread safety (fixed upstream for 2.1): use the pure-Python fallback on the t build. free-threaded-env: DISABLE_SQLALCHEMY_CEXT_RUNTIME=1