Browse Source

👷 update ci with test and db

main
Neel-Leo Coffin 6 years ago
parent
commit
c6a3a6998e
  1. 31
      .circleci/config.yml

31
.circleci/config.yml

@ -8,7 +8,6 @@ jobs:
- restore_cache:
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }}
- run:
name: Install dependencies in a python venv
command: |
python3 -m venv venv
. venv/bin/activate
@ -18,8 +17,18 @@ jobs:
paths:
- "venv"
test:
docker:
- image: cimg/node:14.10.1
docker:
- image: circleci/python:3.9-buster-node-browsers
environment:
DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/psdb
FLASK_APP: autoapp.py
CONDUIT_SECRET: 'something'
FLASK_DEBUG: 1
- image: circleci/postgres:9.6.2-alpine
environment:
POSTGRES_USER: myUsr
POSTGRES_DB: psdb
POSTGRES_PASSWORD: somePwd
steps:
- checkout
- restore_cache:
@ -27,25 +36,11 @@ jobs:
- run:
name: Waiting for postgresql
command : dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: Launching tests
- run:
command: |
. venv/bin/activate
flask db upgrade
flask test
database:
docker:
- image: circleci/python:3.9-buster-node-browsers
environment:
DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/myUsr
FLASK_APP: autoapp.py
CONDUIT_SECRET: 'something'
FLASK_DEBUG: 1
- image: circleci/postgres:9.6.2-alpine
environment:
POSTGRES_USER: myUsr
POSTGRES_DB: psdb
POSTGRES_PASSWORD: somePwd
workflows:
build_and_test:
jobs:

Loading…
Cancel
Save