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.
35 lines
1.0 KiB
35 lines
1.0 KiB
version: 2
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: circleci/python:3.9.1
|
|
- image: circleci/postgres:9.6.5
|
|
environment:
|
|
POSTGRES_DB: psqluer
|
|
POSTGRES_USER: myUsr
|
|
POSTGRES_PASSWORD: somePwd
|
|
working_directory: ~/repo
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "requirements/dev.tx" }}-{{ checksum "requirements/prod.txt" }}
|
|
# fallback to using the latest cache if no exact match is found
|
|
- dependencies-
|
|
- run:
|
|
name: Install dependencies
|
|
command: pip install -r requirements/dev.txt --user
|
|
- run: docker container run --name flask_db_test -e POSTGRES_PASSWORD=somePwd -e POSTGRES_USER=myUsr -p 5432:5432 -d postgres
|
|
- run: sleep 1
|
|
- run:
|
|
name: Setup dababase
|
|
environment:
|
|
DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/myUsr
|
|
FLASK_DEBUG: 0
|
|
command: flask db upgrade
|
|
|
|
workflows:
|
|
version: 2
|
|
build-test:
|
|
jobs:
|
|
- build
|