Created
October 25, 2019 16:41
-
-
Save robcowie/653adb853d120cb5baf706c02be70f84 to your computer and use it in GitHub Desktop.
Example circleci config for running tests with a postgresql DB
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
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