Browse Source

👷 change config

pull/1/head
verzelea 6 years ago
parent
commit
ceb5960830
  1. 35
      .circleci/config.yml

35
.circleci/config.yml

@ -2,44 +2,43 @@ version: 2
jobs: jobs:
build: build:
docker: docker:
- image: python:3.8-buster
working_directory: ~/back
- image: circleci/python:3.7.9-stretch-browsers
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }}
key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
- run: - run:
name: set env vars
command: |
export CONDUIT_SECRET='I<3Cookies'
export FLASK_APP=./autoapp.py
export FLASK_DEBUG=1
- run :
name: install deps
name: Install dependencies in a python venv
command: | command: |
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: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
paths: paths:
- "venv" - "venv"
test: test:
docker: docker:
- image: circleci/postgres:9.6.2-alpine
- image: circleci/python:3.7.9-stretch-browsers
environment:
FLASK_APP: autoapp.py
CONDUIT_SECRET: $CONDUIT_SECRET
FLASK_DEBUG: 1
DATABASE_URL: postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB
- image: circleci/postgres:9.5.19-alpine
environment: environment:
POSTGRES_USER: myUsr
POSTGRES_DB: psdb
POSTGRES_USER: $POSTGRES_USER
POSTGRES_DB: $POSTGRES_DB
POSTGRES_PASSWORD: $POSTGRES_PASSWORD POSTGRES_PASSWORD: $POSTGRES_PASSWORD
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
key: deps-{{ checksum "requirements/dev.txt"}}-{{ .Environment.CACHE_VERSION }}
key: deps1-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
- run: - run:
name: postgres
command : dockerize -wait tcp://localhost:5432 -timeout 1m
name: Wait for postgres
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run: - run:
name : test
name: running test
command: | command: |
. venv/bin/activate . venv/bin/activate
flask db upgrade flask db upgrade

Loading…
Cancel
Save