Skip to content

psycopg3.x

psycopg3.x #12

Workflow file for this run

name: CI
# TODO: See if we want to limit this scope to specified repos/forks
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
# Docker hub postgres image
image: postgres
# Postgres env vars
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_jsonate
# map port on service container to port on docker host
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
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: psycopg3 prerequisites
run: sudo apt-get install libpq-dev
- name: install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute tests
run: |
python test_project/manage.py makemigrations --dry-run --check
python test_project/manage.py test test_app