Browse Source

👷 update ci with test and db

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

27
.circleci/config.yml

@ -8,7 +8,6 @@ jobs:
- restore_cache: - restore_cache:
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }} key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }}
- run: - run:
name: Install dependencies in a python venv
command: | command: |
python3 -m venv venv python3 -m venv venv
. venv/bin/activate . venv/bin/activate
@ -19,7 +18,17 @@ jobs:
- "venv" - "venv"
test: test:
docker: docker:
- image: cimg/node:14.10.1
- 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: steps:
- checkout - checkout
- restore_cache: - restore_cache:
@ -28,24 +37,10 @@ jobs:
name: Waiting for postgresql name: Waiting for postgresql
command : dockerize -wait tcp://localhost:5432 -timeout 1m command : dockerize -wait tcp://localhost:5432 -timeout 1m
- run: - run:
name: Launching tests
command: | command: |
. venv/bin/activate . venv/bin/activate
flask db upgrade flask db upgrade
flask test 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: workflows:
build_and_test: build_and_test:
jobs: jobs:

Loading…
Cancel
Save