Created
August 28, 2019 19:51
-
-
Save sbalnojan/32de024ab3c691c0ca69f0489531524a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
containers: | |
build-env: | |
image: python:3.7 | |
volumes: | |
- local: . | |
container: /src | |
options: cached | |
- local: .pip-cache | |
container: /src/.pip-cache | |
options: cached | |
- local: .pipenv-cache | |
container: /src/.pipenv-cache | |
working_directory: /src | |
environment: | |
PYTHONPATH: "/src" | |
PYTHONUSERBASE: "/src/.pip-cache" | |
PIPENV_VENV_IN_PROJECT: true | |
run_as_current_user: | |
enabled: true | |
home_directory: /home/container-user | |
db: | |
image: postgres | |
tasks: | |
dep: | |
description: Install dependencies via pipenv | |
group: Utility tasks | |
run: | |
container: build-env | |
command: sh -c 'pip install --user pipenv; python -m pipenv install' | |
integration_test_fail: | |
description: Run the failing integration test. | |
prerequisites: | |
- dep | |
dependencies: | |
- db | |
run: | |
container: build-env | |
command: python -m pipenv run pytest test_sql.py | |
integration_test_pass: | |
description: Run the passing integration test (and take a look what changed) | |
prerequisites: | |
- dep | |
dependencies: | |
- db | |
run: | |
container: build-env | |
environment: | |
DB_HOST: db | |
command: python -m pipenv run pytest test_sql.py | |
shell: | |
description: Start a shell in the development environment. | |
group: Utility tasks | |
prerequisites: | |
- dep | |
run: | |
container: build-env | |
command: /bin/sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment