Skip to content
Snippets Groups Projects
Commit 509b9546 authored by florimondmanca's avatar florimondmanca
Browse files

update .travis.yml

parent f93be5bd
No related branches found
No related tags found
No related merge requests found
...@@ -12,45 +12,28 @@ services: ...@@ -12,45 +12,28 @@ services:
install: install:
- pip install -r requirements.txt - pip install -r requirements.txt
# Supervisor < 4 does not support python 3 but Supervisor 4 is not
# released to PyPI yet. => Install from Github
- pip install git+https://github.com/Supervisor/supervisor.git - pip install git+https://github.com/Supervisor/supervisor.git
before_script: before_script:
# Start Celery using the supervisor config
- supervisord - supervisord
- psql -c 'create database oser_showcase_backend_db;' -U postgres
# Create local PostgreSQL database - cd project
# NOTE: the database name (here 'oser_backend_db') must match the name
# in one of these DATABASE_URL setting:
# - the one set up in TravisCI environment variables
# - the one set up in settings/default.py
- psql -c 'create database oser_backend_db;' -U postgres
# Go to the project root directory
- cd oser_backend
# Apply database migrations
- python manage.py migrate - python manage.py migrate
script: script:
# Run tests
- python manage.py test - python manage.py test
before_deploy: before_deploy:
# Return the repository root
- cd .. && ls - cd .. && ls
deploy: deploy:
# Deploy to Heroku once the tests have passed
# See TravisCI docs: https://docs.travis-ci.com/user/deployment/heroku/
provider: heroku provider: heroku
app: app:
# direct each branch to the corresponding app # direct each branch to the corresponding app
master: oser-backend master: oser-showcase-backend
staging: oser-backend-staging staging: oser-showcase-backend-staging
run: run:
# automatically run new migrations - 'python project/manage.py migrate'
- 'python oser_backend/manage.py migrate'
api_key: api_key:
# Encrypted API key obtained from the following command # Encrypted API key obtained from the following command
# (requires TravisCI and Heroku CLI installed) # (requires TravisCI and Heroku CLI installed)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment