|
|
@ -2,7 +2,17 @@ version: 2.1 |
|
|
jobs: |
|
|
jobs: |
|
|
build: |
|
|
build: |
|
|
docker: |
|
|
docker: |
|
|
- image: circleci/python:3.9 |
|
|
|
|
|
|
|
|
- image: circleci/python:3.7 |
|
|
|
|
|
environment: |
|
|
|
|
|
DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/psdb |
|
|
|
|
|
FLASK_APP: autoapp.py |
|
|
|
|
|
CONDUIT_SECRET: 'something-really-secret' |
|
|
|
|
|
FLASK_DEBUG: 1 |
|
|
|
|
|
- image: circleci/postgres:9.6.5-alpine-ram |
|
|
|
|
|
environment: |
|
|
|
|
|
POSTGRES_USER: myUsr |
|
|
|
|
|
POSTGRES_DB: psdb |
|
|
|
|
|
POSTGRES_PASSWORD: somePwd |
|
|
steps: |
|
|
steps: |
|
|
- checkout |
|
|
- checkout |
|
|
- restore_cache: |
|
|
- restore_cache: |
|
|
@ -12,13 +22,14 @@ jobs: |
|
|
python3 -m venv venv |
|
|
python3 -m venv venv |
|
|
. venv/bin/activate |
|
|
. venv/bin/activate |
|
|
pip install -r requirements/dev.txt |
|
|
pip install -r requirements/dev.txt |
|
|
|
|
|
|
|
|
- save_cache: |
|
|
- save_cache: |
|
|
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }} |
|
|
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }} |
|
|
paths: |
|
|
paths: |
|
|
- "venv" |
|
|
- "venv" |
|
|
test: |
|
|
test: |
|
|
docker: |
|
|
docker: |
|
|
- image: circleci/python:3.9 |
|
|
|
|
|
|
|
|
- image: circleci/python:3.7 |
|
|
environment: |
|
|
environment: |
|
|
DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/psdb |
|
|
DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/psdb |
|
|
FLASK_APP: autoapp.py |
|
|
FLASK_APP: autoapp.py |
|
|
@ -39,8 +50,8 @@ jobs: |
|
|
name: Launching tests |
|
|
name: Launching tests |
|
|
command: | |
|
|
command: | |
|
|
. venv/bin/activate |
|
|
. venv/bin/activate |
|
|
python3.9 -m flask db upgrade |
|
|
|
|
|
python3.9 -m flask test |
|
|
|
|
|
|
|
|
python3.7 -m flask db upgrade |
|
|
|
|
|
python3.7 -m flask test |
|
|
deploy-heroku: |
|
|
deploy-heroku: |
|
|
docker: |
|
|
docker: |
|
|
- image : buildpack-deps:trusty |
|
|
- image : buildpack-deps:trusty |
|
|
@ -49,7 +60,7 @@ jobs: |
|
|
- run: |
|
|
- run: |
|
|
command: | |
|
|
command: | |
|
|
git config --global push.default matching |
|
|
git config --global push.default matching |
|
|
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git main |
|
|
|
|
|
|
|
|
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git mainhero |
|
|
- run: |
|
|
- run: |
|
|
name: Smoke test |
|
|
name: Smoke test |
|
|
command: | |
|
|
command: | |
|
|
|