Browse Source

👷 update tipo and change

main
Julien Dudek 6 years ago
parent
commit
cfb48f6c8a
  1. 70
      .circleci/config.yml

70
.circleci/config.yml

@ -4,43 +4,43 @@
# #
version: 2 version: 2
jobs: jobs:
build:
working_directory: ~/circleci-demo-python-django
docker: # run the steps with Docker
build:
working_directory: ~/circleci-demo-python-django
docker: # run the steps with Docker
# CircleCI Python images available at: https://hub.docker.com/r/circleci/python/ # CircleCI Python images available at: https://hub.docker.com/r/circleci/python/
- image: circleci/python:3.8.5
auth:
username: $DOCKER_HUB_USER_ID
password: $DOCKER_HUB_PWD # context / project UI env-var reference
environment: # environment variables for primary container
PIPENV_VENV_IN_PROJECT: true
DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable
- image: circleci/python:3.8.5
auth:
username: $DOCKER_HUB_USER_ID
password: $DOCKER_HUB_PWD # context / project UI env-var reference
environment: # environment variables for primary container
PIPENV_VENV_IN_PROJECT: true
DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable
# CircleCI PostgreSQL images available at: https://hub.docker.com/r/circleci/postgres/ # CircleCI PostgreSQL images available at: https://hub.docker.com/r/circleci/postgres/
- image: circleci/postgres:9.6.9-alpine
auth:
username: $DOCKER_HUB_USER_ID
password: $DOCKER_HUB_PWD # context / project UI env-var reference
environment: # environment variables for the Postgres container.
POSTGRES_USER: root
POSTGRES_DB: circle_test
steps: # steps that comprise the `build` job
- checkout # check out source code to working directory
- run: sudo chown -R circleci:circleci /usr/local/bin
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.8/site-packages
- restore_cache:
keys:
- v7-dependencies-{{ checksum "requirements/dev.txt" }}
- v7-dependencies-
- run:
command: |
export FLASK_APP=autoapp.py
pip install -r requirements/dev.txt --user
flask db upgrade
flask test
- save_cache:
paths:
- venv
key: v7-dependencies-{{ checksum "requirements/dev.txt" }}
- image: circleci/postgres:9.6.9-alpine
auth:
username: $DOCKER_HUB_USER_ID
password: $DOCKER_HUB_PWD # context / project UI env-var reference
environment: # environment variables for the Postgres container.
POSTGRES_USER: root
POSTGRES_DB: circle_test
steps: # steps that comprise the `build` job
- checkout # check out source code to working directory
- run: sudo chown -R circleci:circleci /usr/local/bin
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.8/site-packages
- restore_cache:
keys:
- v7-dependencies-{{ checksum "requirements/dev.txt" }}
- v7-dependencies-
- run:
command: |
export FLASK_APP=autoapp.py
pip install -r requirements/dev.txt --user
flask db upgrade
flask test
- save_cache:
paths:
- venv
key: v7-dependencies-{{ checksum "requirements/dev.txt" }}
back-deploy-heroku: back-deploy-heroku:
docker: docker:
- image: buildpack-deps:trusty - image: buildpack-deps:trusty

Loading…
Cancel
Save