Skip to content

[pre-commit.ci] pre-commit autoupdate #117

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #117

Workflow file for this run

name: check
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
test:
name: test ${{ matrix.py }} on postgres ${{ matrix.postgres-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
postgres-version:
# - 12 - 5.1 doesn't support 12 anymore, let's just stop running tests for it
- 13
- 14
- 15
- 16
steps:
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- uses: actions/checkout@v4
- name: Create database
run: |
# maps the container port to localhost
docker run --name db -p 5432:5432 -d -e POSTGRES_PASSWORD=postgres postgres:${{ matrix.postgres-version }}
sleep 10 # wait for server to initialize
- name: Install tox-gh
run: python -m pip install tox-gh
- name: Run test suite
run: tox