summaryrefslogtreecommitdiffstats
path: root/.github/workflows/packages-pool.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:41:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:41:08 +0000
commit506ed8899b3a97e512be3fd6d44d5b11463bf9bf (patch)
tree808913770c5e6935d3714058c2a066c57b4632ec /.github/workflows/packages-pool.yml
parentInitial commit. (diff)
downloadpsycopg3-506ed8899b3a97e512be3fd6d44d5b11463bf9bf.tar.xz
psycopg3-506ed8899b3a97e512be3fd6d44d5b11463bf9bf.zip
Adding upstream version 3.1.7.upstream/3.1.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/packages-pool.yml')
-rw-r--r--.github/workflows/packages-pool.yml66
1 files changed, 66 insertions, 0 deletions
diff --git a/.github/workflows/packages-pool.yml b/.github/workflows/packages-pool.yml
new file mode 100644
index 0000000..e9624e7
--- /dev/null
+++ b/.github/workflows/packages-pool.yml
@@ -0,0 +1,66 @@
+name: Build pool packages
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '28 6 * * sun'
+
+jobs:
+
+ sdist:
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - {package: psycopg_pool, format: sdist, impl: python}
+ - {package: psycopg_pool, format: wheel, impl: python}
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: actions/setup-python@v4
+ with:
+ python-version: 3.9
+
+ - name: Create the sdist packages
+ run: |-
+ python ${{ matrix.package }}/setup.py sdist -d `pwd`/dist/
+ if: ${{ matrix.format == 'sdist' }}
+
+ - name: Create the wheel packages
+ run: |-
+ pip install wheel
+ python ${{ matrix.package }}/setup.py bdist_wheel -d `pwd`/dist/
+ if: ${{ matrix.format == 'wheel' }}
+
+ - name: Install the Python pool package and test requirements
+ run: |-
+ pip install dist/*
+ pip install ./psycopg[test]
+
+ - name: Test the sdist package
+ run: pytest -m 'not slow and not flakey' --color yes
+ env:
+ PSYCOPG_IMPL: ${{ matrix.impl }}
+ PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres"
+ PGPASSWORD: password
+
+ - uses: actions/upload-artifact@v3
+ with:
+ path: ./dist/*
+
+ services:
+ postgresql:
+ image: postgres:14
+ env:
+ POSTGRES_PASSWORD: password
+ ports:
+ - 5432:5432
+ # Set health checks to wait until postgres has started
+ options: >-
+ --health-cmd pg_isready
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 5