Merge remote-tracking branch 'origin/feature/update-task-data' into feature/update-task-data

This commit is contained in:
Aaron Louie 2020-02-05 14:55:59 -05:00
commit 58982ab306
3 changed files with 15 additions and 6 deletions

12
.travis.yml Normal file
View File

@ -0,0 +1,12 @@
language: python
python:
- "3.6"
- "3.7"
- "3.8"
install:
- pip install pipenv pytest
- pipenv install
- pytest # <== This runs in Pipenv (a/k/a virtualenv)
# command to run tests
script:
- pytest

View File

@ -19,11 +19,6 @@ RUN pipenv install --dev
# include rejoiner code (gets overriden by local changes)
COPY . /crc-workflow/
# run migrations
ENV FLASK_APP=./crc/__init__.py
RUN pipenv run flask db upgrade
RUN pipenv run flask load-example-data
# run webserver by default
CMD ["pipenv", "run", "python", "./run.py"]

View File

@ -18,7 +18,9 @@ app.config.from_object('config.default')
if "TESTING" in os.environ and os.environ["TESTING"] == "true":
app.config.from_object('config.testing')
app.config.from_pyfile('testing.py')
else:
# load the instance/config.py, if it exists, when not testing
app.config.from_pyfile('config.py', silent=True)
db = SQLAlchemy(app)
""":type: sqlalchemy.orm.SQLAlchemy"""