From: Daniele Varrazzo Date: Wed, 7 May 2025 02:45:14 +0000 (+0200) Subject: ci: test integration of pool package with previous psycopg version X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=942071cbee2ae6082d8b81e67959afdebdc3d7d4;p=thirdparty%2Fpsycopg.git ci: test integration of pool package with previous psycopg version --- diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a171e395f..ce5f76a1c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -137,6 +137,48 @@ jobs: run: ./tools/ci/ci_test.sh + # }}} + + pool-integration: # {{{ + # Test the current pool version with older psycopg versions + runs-on: ubuntu-latest + if: true + + strategy: + fail-fast: false + matrix: + include: + - {psycopg: "3.3", python: "3.13", postgres: "postgres:17"} + - {psycopg: "3.2", python: "3.12", postgres: "postgres:17"} + + env: + DEPS: psycopg<${{ matrix.psycopg }} ./psycopg_pool[test] + PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres password=password" + MARKERS: "pool" + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Start PostgreSQL service + # Note: this would love to be a service, but I don't see a way to pass + # the args to the docker run command line. + run: | + docker pull ${{ matrix.postgres }} + docker run --rm -d --name postgres -p 5432:5432 \ + -e POSTGRES_PASSWORD=password ${{ matrix.postgres }} \ + -c max_prepared_transactions=10 + + - name: Install Python packages + run: pip install $DEPS + + - name: Run tests + run: ./tools/ci/ci_test.sh + + # }}} macos-14: # {{{ diff --git a/psycopg_pool/pyproject.toml b/psycopg_pool/pyproject.toml index 6f94406c4..fd13ed75e 100644 --- a/psycopg_pool/pyproject.toml +++ b/psycopg_pool/pyproject.toml @@ -51,6 +51,16 @@ Code = "https://github.com/psycopg/psycopg" file = "README.rst" content-type = "text/x-rst" +[project.optional-dependencies] +test = [ + "anyio >= 4.0", + "mypy >= 1.14", + "pproxy >= 2.7", + "pytest >= 6.2.5", + "pytest-cov >= 3.0", + "pytest-randomly >= 3.5", +] + [tool.setuptools] zip-safe = false include-package-data = true