You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.5 KiB
59 lines
1.5 KiB
version: 2
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: circleci/python:3.7.4
|
|
steps:
|
|
- checkout
|
|
- run: echo "$CONDUIT_SECRET $FLASK_APP $FLASK_DEBUG"
|
|
- run:
|
|
name: install pyth dependencies
|
|
command: |
|
|
python3 -m venv venv
|
|
. venv/bin/activate
|
|
pip3 install -r requirements/dev.txt
|
|
- save_cache:
|
|
paths:
|
|
- ./venv
|
|
key: v2-dependencies-{{ checksum "requirements/dev.txt" }}
|
|
initialise:
|
|
docker:
|
|
- image: circleci/python:3.7.4
|
|
environment:
|
|
DATABASE_URL: postgresql://myuser:somePwd@localhost:5432/myuser
|
|
- image: circleci/postgres:9.6.5-alpine-ram
|
|
environment:
|
|
POSTGRES_DB: myuser
|
|
POSTGRES_USER: myuser
|
|
POSTGRES_PASSWORD: somePwd
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- v2-dependencies-{{ checksum "requirements/dev.txt" }}
|
|
- v2-dependencies-
|
|
- run:
|
|
name: flask upgrade
|
|
command: |
|
|
. venv/bin/activate
|
|
sleep 1
|
|
export CONDUIT_SECRET='something-really-secret'
|
|
export FLASK_APP=/path/to/autoapp.py
|
|
export FLASK_DEBUG=1
|
|
flask db upgrade
|
|
- run:
|
|
name: flask test
|
|
command: |
|
|
. venv/bin/activate
|
|
sleep 1
|
|
flask test
|
|
|
|
workflows:
|
|
version: 2
|
|
build_circleci:
|
|
jobs:
|
|
- build
|
|
- initialise:
|
|
requires:
|
|
- build
|
|
|