Skip to content

Instantly share code, notes, and snippets.

@robcowie
Created October 25, 2019 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robcowie/653adb853d120cb5baf706c02be70f84 to your computer and use it in GitHub Desktop.
Save robcowie/653adb853d120cb5baf706c02be70f84 to your computer and use it in GitHub Desktop.
Example circleci config for running tests with a postgresql DB
version: 2.1
jobs:
test-cf-audit-report-data:
docker:
- image: circleci/python:3.7.1
- image: circleci/postgres:11.4-alpine-ram
environment:
POSTGRES_USER: user
POSTGRES_DB: test
POSTGRES_PASSWORD: ""
environment:
AUDIT_REPORT_DB_URI: postgresql://user@localhost:5432/test
steps:
- checkout
- run:
name: Install dependencies
command: |
sudo pip install pipenv
pipenv sync
pipenv install --dev --skip-lock
pipenv install psycopg2 --skip-lock
- run:
name: Unit tests
command: |
cd cloud_functions/audit-report-data
pipenv run pytest
workflows:
version: 2
workflow:
jobs:
- test-cf-audit-report-data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment