|
|
|
@ -2,7 +2,7 @@ version: 2 |
|
|
|
jobs: |
|
|
|
build: |
|
|
|
docker: |
|
|
|
- image: circleci/python:3.8.5 |
|
|
|
- image: circleci/python:3.9-buster-node-browsers |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
- restore_cache: |
|
|
|
@ -19,7 +19,7 @@ jobs: |
|
|
|
- venv |
|
|
|
test: |
|
|
|
docker: |
|
|
|
- image: circleci/python:3.8.5 |
|
|
|
- image: circleci/python:3.9-buster-node-browsers |
|
|
|
environment: |
|
|
|
DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/dbtest |
|
|
|
FLASK_APP: /home/circleci/repo/autoapp.py |
|
|
|
@ -33,7 +33,7 @@ jobs: |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
- restore_cache: |
|
|
|
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }} |
|
|
|
key: dependencies-{{ checksum "requirements/dev.txt"}}-{{ checksum "requirements/prod.txt" }} |
|
|
|
- run: docker container run --name flask_db_test -e POSTGRES_PASSWORD=somePwd -e POSTGRES_USER=myUsr -p 5432:5432 -d dbtest |
|
|
|
- run: |
|
|
|
name: sleep 1 |
|
|
|
@ -52,11 +52,12 @@ jobs: |
|
|
|
- image : buildpack-deps:trusty |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
staging: |
|
|
|
- branch: main |
|
|
|
- run: |
|
|
|
name: Heroku deploy |
|
|
|
command: | |
|
|
|
git config --global push.default matching |
|
|
|
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:main |
|
|
|
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git |
|
|
|
- run: |
|
|
|
name: Smoke test |
|
|
|
command: | |
|
|
|
|