Skip to content

Update testing workflow to improve Python and Postgres setup #19

Update testing workflow to improve Python and Postgres setup

Update testing workflow to improve Python and Postgres setup #19

Workflow file for this run

name: Testing
on:
pull_request:
push:
branches: ["*"]
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
tags-ignore: ["*"]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:${{ matrix.postgres }}
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432
strategy:
fail-fast: true
matrix:
python: ["3.11"] #, "3.12", "3.13"]
postgres: [14] #, 15, 16, 17]
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '${{ matrix.python }}'
- name: Setup environment
run: apt-get update && apt-get install -y bash cargo gcc git libffi-dev libpq-dev build-essential postgresql postgresql-server-dev-15 rustc tzdata
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Setup test/fixture data
run: ci/test-setup
- name: Run tests
run: ci/test
env:
NOBOOTSTRAP: true
POSTGRES_URI: postgresql://postgres@postgres:5432/postgres
- name: Upload Coverage
uses: codecov/codecov-action@v1
with:
file: build/coverage.xml