1 changed files with 61 additions and 70 deletions
@ -1,71 +1,62 @@ |
|||||
version: 2 |
|
||||
workflows: |
|
||||
test: |
|
||||
jobs: |
|
||||
- build |
|
||||
- flask_tests: |
|
||||
requires: |
|
||||
- build |
|
||||
|
|
||||
|
--- |
||||
jobs: |
jobs: |
||||
build: |
build: |
||||
docker: |
docker: |
||||
- image: circleci/python:3.6-buster-node-browsers |
|
||||
|
- |
||||
|
image: "circleci/python:3.6-buster-node-browsers" |
||||
steps: |
steps: |
||||
- checkout |
- 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: |
paths: |
||||
- "venv" |
|
||||
|
|
||||
|
|
||||
|
- venv |
||||
flask_tests: |
flask_tests: |
||||
docker: |
docker: |
||||
- image: circleci/python:3.6-buster-node-browsers |
|
||||
|
- |
||||
environment: |
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_APP: autoapp.py |
||||
FLASK_DEBUG: 1 |
FLASK_DEBUG: 1 |
||||
- image: circleci/postgres:9.6.9-alpine-ram |
|
||||
|
image: "circleci/python:3.6-buster-node-browsers" |
||||
|
- |
||||
environment: |
environment: |
||||
POSTGRES_USER: denis |
|
||||
POSTGRES_PASSWORD: denis |
|
||||
POSTGRES_BD: postgres |
POSTGRES_BD: postgres |
||||
|
POSTGRES_PASSWORD: denis |
||||
|
POSTGRES_USER: denis |
||||
|
image: "circleci/postgres:9.6.9-alpine-ram" |
||||
steps: |
steps: |
||||
- checkout |
- 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: | |
command: | |
||||
. venv/bin/activate |
. venv/bin/activate |
||||
flask db stamp head |
flask db stamp head |
||||
flask db migrate |
flask db migrate |
||||
flask db upgrade |
flask db upgrade |
||||
flask test |
flask test |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
name: "Tests Flask" |
||||
|
version: 2 |
||||
|
workflows: |
||||
|
test: |
||||
|
jobs: |
||||
|
- build |
||||
|
- |
||||
|
flask_tests: |
||||
|
requires: |
||||
|
- build |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue