|
|
@ -72,30 +72,28 @@ jobs: |
|
|
# fallback to using the latest cache if no exact match is found |
|
|
# fallback to using the latest cache if no exact match is found |
|
|
|
|
|
|
|
|
- run: |
|
|
- run: |
|
|
name: bd upgrade |
|
|
|
|
|
|
|
|
name: install dockerize |
|
|
|
|
|
command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz |
|
|
|
|
|
environment: |
|
|
|
|
|
DOCKERIZE_VERSION: v0.3.0 |
|
|
|
|
|
- run: |
|
|
|
|
|
name: Wait for db |
|
|
|
|
|
command: dockerize -wait tcp://localhost:5432 -timeout 1m |
|
|
|
|
|
- run: |
|
|
|
|
|
name: Migrate Database |
|
|
command: | |
|
|
command: | |
|
|
|
|
|
export CONDUIT_SECRET='something-really-secret' |
|
|
|
|
|
export FLASK_APP=/home/circleci/repo/autoapp.py |
|
|
|
|
|
export FLASK_DEBUG=1 |
|
|
|
|
|
export DATABASE_URL=postgresql://myUsr:somePwd@localhost:5432/postgres |
|
|
. venv/bin/activate |
|
|
. venv/bin/activate |
|
|
sleep 1 |
|
|
|
|
|
flask db upgrade |
|
|
flask db upgrade |
|
|
environment: |
|
|
|
|
|
CONDUIT_SECRET: 'something-really-secret' |
|
|
|
|
|
FLASK_APP: /home/circleci/repo/autoapp.py |
|
|
|
|
|
DATABASE_URL: postgresql://myUsr:somePwd@localhost:5432/myUsr |
|
|
|
|
|
FLASK_DEBUG: 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
flask db migrate |
|
|
|
|
|
|
|
|
# run tests! |
|
|
|
|
|
# this example uses Django's built-in test-runner |
|
|
|
|
|
# other common Python testing frameworks include pytest and nose |
|
|
|
|
|
# https://pytest.org |
|
|
|
|
|
# https://nose.readthedocs.io |
|
|
|
|
|
- run: |
|
|
- run: |
|
|
name: run tests |
|
|
name: run tests |
|
|
command: | |
|
|
command: | |
|
|
. venv/bin/activate |
|
|
. venv/bin/activate |
|
|
flask db migrate |
|
|
|
|
|
flask test |
|
|
flask test |
|
|
environment: |
|
|
environment: |
|
|
CONDUIT_SECRET: 'something-really-secret' |
|
|
CONDUIT_SECRET: 'something-really-secret' |
|
|
|