Compare commits

...

10 Commits
main ... tests

Author SHA1 Message Date
Pierre 436cf8a819 👷 test 5th try 6 years ago
Pierre f87cace126 👷 test 4th try 6 years ago
Pierre cf9fdd4e32 👷 test 3rd try 6 years ago
Pierre 0649dbbb54 👷 test 2nd try 6 years ago
Pierre 75d9179e6b 💚 fix workflow 3 6 years ago
Pierre 76082bbfdc 💚 fix workflow 2 6 years ago
Pierre 01a01837ad 💚 fix workflow 6 years ago
Pierre 0198ee4e94 💚 add workflow 6 years ago
Pierre 99c92afb91 👷 test 1st try 6 years ago
Pierre db121e0cd2 👷 simplify config .yml 6 years ago
  1. 56
      .circleci/config.yml

56
.circleci/config.yml

@ -2,10 +2,10 @@ version: 2 # use CircleCI 2.0
jobs: # A basic unit of work in a run
build: # runs not using Workflows must have a `build` job as entry point
# directory where steps are run
working_directory: ~/circleci-demo-python-django
# working_directory: ~/circleci-demo-python-django
docker: # run the steps with Docker
# CircleCI Python images available at: https://hub.docker.com/r/circleci/python/
- image: circleci/python:3.8.5
- image: circleci/python:3.9.1
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
@ -22,8 +22,8 @@ jobs: # A basic unit of work in a run
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
# - run: sudo chown -R circleci:circleci /usr/local/bin
# - run: sudo chown -R circleci:circleci /usr/local/lib/python3.8/site-packages
- restore_cache:
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
@ -43,4 +43,50 @@ jobs: # A basic unit of work in a run
path: test-results
- store_artifacts: # Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
path: test-results
destination: tr1
destination: tr1
test:
docker:
- image: circleci/python:3.9.1
- image: circleci/postgres:9.6.5
environment:
POSTGRES_USER: myUsr
POSTGRES_PASSOWRD: somePwd
POSTGRES_DB: myUsr
steps:
- checkout
- restore_cache:
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run:
name: bd upgrade
command: |
pip install --user Flask
flask db init
flask db migrate
flask db upgrade
flask test
environment:
CONDUIT_SECRET: $CONDUIT_SECRET
FLASK_APP: autoapp.py
FLASK_DEBUG: 1
DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/myUsr
- run:
name: flask test
command: |
. venv/bin/activate
sleep 1
flask test
environment:
CONDUIT_SECRET: 'something-really-secret'
FLASK_APP: autoapp.py
FLASK_DEBUG: 1
DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/myUsr
workflows:
version: 2
build-test:
jobs:
- build
- test:
requires:
- build
Loading…
Cancel
Save