Browse Source

Update config.yml

circleci-project-setup
khelia 5 years ago
parent
commit
499123a790
  1. 64
      .circleci/config.yml

64
.circleci/config.yml

@ -1,4 +1,4 @@
version: 2.1
ersion: 2.1
orbs: orbs:
python: circleci/python@0.2.1 python: circleci/python@0.2.1
@ -6,16 +6,72 @@ orbs:
jobs: jobs:
build-and-test: build-and-test:
executor: python/default executor: python/default
- run_tests:
docker:
- image: circleci/python:3.9.1
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD
environment:
FLASK_CONFIG: testing
TEST_DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable
- image: circleci/postgres: 9.6.5
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD
environment:
POSTGRE_USER: postgres
POSTGRE_DB:
POSTGRE_PASSWORD: ""
steps: steps:
- checkout - checkout
- python/load-cache
#- run: pip install -r requirements/dev.txt
# name: Update PATH and Define Environment Variable at Runtime
# command:
# export CONDUIT_SECRET='something-really-secret'
# export FLASK_APP=/path/to/autoapp.py
# export FLASK_DEBUG=0
#- python/load-cache
- restore_cache
key: deps1-{{ .Branch }}-{{ checksum "requirements/prod.txt" }}
-run:
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements/prod.txt
- python/install-deps - python/install-deps
- python/save-cache
- run: - run:
command: ./manage.py test
name: Install Python deps in a venv
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements/prod.txt
- save-cache
key: deps1-{{ .Branch }}-{{ checksum "requirements/prod.txt" }}}
paths:
- "venv"
- run:
command:
. venv/bin/activate
./manage.py test
name: Test name: Test
- store_artifacts:
path: test-reports/
destination: tr1
- store_test_results:
path: test-reports/
#- run:
# name: Update PATH and Define Environment Variable at Runtime
# command:
# export CONDUIT_SECRET='something-really-secret'
# export FLASK_APP=/path/to/autoapp.py
# export FLASK_DEBUG=1
workflows: workflows:
main: main:
jobs: jobs:
- build-and-test - build-and-test
#- run_tests:
# docker:
# - image:circleci/python: 3.9.1
Loading…
Cancel
Save