Skip to content

Release 1.2

Release 1.2 #243

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
postgresql-version: [12, 13, 14, 15, 16]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install PostgreSQL
env:
POSTGRESQL_VERSION: ${{ matrix.postgresql-version }}
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install "postgresql-$POSTGRESQL_VERSION"
- name: Install dependencies
run: |
pip install -e '.[test]'
- name: Run tests
env:
POSTGRESQL_VERSION: ${{ matrix.postgresql-version }}
run: |
export POSTGRESQL_PATH="/usr/lib/postgresql/$POSTGRESQL_VERSION/bin/postgres"
export INITDB_PATH="/usr/lib/postgresql/$POSTGRESQL_VERSION/bin/initdb"
export PYTHONPATH="pytest_plugins:test_project"
pytest
- name: Check formatting
run: black . --check