Skip to content

Rename pysql_test to pgsql_test to match project name #9

Rename pysql_test to pgsql_test to match project name

Rename pysql_test to pgsql_test to match project name #9

name: Pets Rollback Example
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-pets-rollback
cancel-in-progress: true
jobs:
test-rollback:
name: Test per-test rollback with pets example
runs-on: ubuntu-latest
env:
PGHOST: localhost
PGPORT: 5432
PGUSER: postgres
PGPASSWORD: password
services:
pg_db:
image: ghcr.io/constructive-io/docker/postgres-plus:17
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: poetry install
- name: Run pets rollback example tests
run: poetry run pytest tests/test_pets_rollback.py -v