1 changed files with 61 additions and 70 deletions
@ -1,71 +1,62 @@ |
|||
version: 2 |
|||
workflows: |
|||
test: |
|||
jobs: |
|||
- build |
|||
- flask_tests: |
|||
requires: |
|||
- build |
|||
|
|||
--- |
|||
jobs: |
|||
build: |
|||
docker: |
|||
- image: circleci/python:3.6-buster-node-browsers |
|||
- |
|||
image: "circleci/python:3.6-buster-node-browsers" |
|||
steps: |
|||
- checkout |
|||
- restore_cahce: |
|||
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION}} |
|||
- run: |
|||
name: Installation des dépendances python |
|||
command: |
|||
python3 -m venv venv |
|||
. venv/bin/active |
|||
pip install -r requirements/dev.txt |
|||
- save_cache: |
|||
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }} |
|||
- |
|||
restore_cahce: |
|||
key: "deps-{{ checksum \"requirements/dev.txt\"}}-{{ .Environment.CACHE_VERSION}}" |
|||
- |
|||
run: |
|||
command: "python3 -m venv venv . venv/bin/active pip install -r requirements/dev.txt" |
|||
name: "Installation des dépendances python" |
|||
- |
|||
save_cache: |
|||
key: "deps-{{ checksum \"requirements/dev.txt\"}}-{{ .Environment.CACHE_VERSION }}" |
|||
paths: |
|||
- "venv" |
|||
|
|||
|
|||
- venv |
|||
flask_tests: |
|||
docker: |
|||
- image: circleci/python:3.6-buster-node-browsers |
|||
- |
|||
environment: |
|||
DATABASE_URL: postgresql://denis:denis@localhost:5432/postgres?sslmode=disable |
|||
CONDUIT_SECRET: 'something-really-secret' |
|||
CONDUIT_SECRET: something-really-secret |
|||
DATABASE_URL: "postgresql://denis:denis@localhost:5432/postgres?sslmode=disable" |
|||
FLASK_APP: autoapp.py |
|||
FLASK_DEBUG: 1 |
|||
- image: circleci/postgres:9.6.9-alpine-ram |
|||
image: "circleci/python:3.6-buster-node-browsers" |
|||
- |
|||
environment: |
|||
POSTGRES_USER: denis |
|||
POSTGRES_PASSWORD: denis |
|||
POSTGRES_BD: postgres |
|||
POSTGRES_PASSWORD: denis |
|||
POSTGRES_USER: denis |
|||
image: "circleci/postgres:9.6.9-alpine-ram" |
|||
steps: |
|||
- checkout |
|||
- restore_cache: |
|||
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }} |
|||
- run: |
|||
name: Attente de postgres |
|||
command: dockerize -wait tcp://localhost:5432 -timeout 1m |
|||
- run: |
|||
name: Tests Flask |
|||
- |
|||
restore_cache: |
|||
key: "deps-{{ checksum \"requirements/dev.txt\"}}-{{ .Environment.CACHE_VERSION }}" |
|||
- |
|||
run: |
|||
command: "dockerize -wait tcp://localhost:5432 -timeout 1m" |
|||
name: "Attente de postgres" |
|||
- |
|||
run: |
|||
command: | |
|||
. venv/bin/activate |
|||
flask db stamp head |
|||
flask db migrate |
|||
flask db upgrade |
|||
flask test |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
name: "Tests Flask" |
|||
version: 2 |
|||
workflows: |
|||
test: |
|||
jobs: |
|||
- build |
|||
- |
|||
flask_tests: |
|||
requires: |
|||
- build |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue