downgrade psycopg (NewRelic constraint) #51
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: psycopg2 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 |