Browse Source

💚 Add pip upgrade for sqlalchemy and Flask-SQLAlchemy

main
Pierre Fontaine 5 years ago
parent
commit
2a73e363dd
  1. 20
      .circleci/config.yml

20
.circleci/config.yml

@ -16,32 +16,26 @@ jobs:
- restore_cache: - restore_cache:
keys: keys:
- dependencies-{{ checksum "requirements/dev.txt" }}-{{ checksum "requirements/prod.txt" }} - dependencies-{{ checksum "requirements/dev.txt" }}-{{ checksum "requirements/prod.txt" }}
# fallback to using the latest cache if no exact match is found
# Fallback to using the latest cache if no exact match is found
- dependencies- - dependencies-
- run: - run:
name: Install dependencies name: Install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements/dev.txt
command: pip install -r requirements/dev.txt
# Upgrade dependencies for sqlalchemy and Flask-SQLAlchemy to pass unit tests
- run: - run:
command: pip install Flask-JWT-Extended --upgrade
command: pip install sqlalchemy --upgrade && pip install Flask-SQLAlchemy --upgrade
- run: - run:
name: Setup dababase name: Setup dababase
environment: environment:
FLASK_APP: /home/circleci/repo/autoapp.py FLASK_APP: /home/circleci/repo/autoapp.py
FLASK_DEBUG: 0 FLASK_DEBUG: 0
command: |
. venv/bin/activate
flask db upgrade
command: flask db upgrade
- run: - run:
name: Flask test name: Flask test
environment: environment:
FLASK_APP: /home/circleci/repo/autoapp.py FLASK_APP: /home/circleci/repo/autoapp.py
FLASK_DEBUG: 0 FLASK_DEBUG: 0
command: |
. venv/bin/activate
flask test
command: flask test
back-deploy-heroku: back-deploy-heroku:
docker: docker:
- image: buildpack-deps:trusty - image: buildpack-deps:trusty
@ -49,7 +43,7 @@ jobs:
- checkout - checkout
- run: - run:
name: Heroku Deploy name: Heroku Deploy
command: git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:main
command: git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:main -f
- run: - run:
name: Smoke Test name: Smoke Test
command: | command: |

Loading…
Cancel
Save