Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Move alembic migration running to Tox
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorbaptista committed Jan 4, 2018
1 parent 1351ac4 commit 2f04764
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ run: ## Run the container
deploy: build login push ## Build the Docker image and push it to the Docker Hub

migrate: ## Run database migrations for the app
alembic upgrade head
tox -e migrate

frontend: ## Compile the frontend assets
npm run build
Expand Down
7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ passenv =
S3_LAMBDA_ARN
S3_LAMBDA_HOOK_SECRET
commands =
alembic upgrade head
py.test \
--cov {[tox]package} \
--cov-report term-missing \
Expand All @@ -44,3 +43,9 @@ commands =
pylama \
{toxinidir}/{[tox]package} \
{posargs}

[testenv:migrate]
deps =
-r{toxinidir}/requirements.txt
commands =
alembic {posargs:upgrade head}

0 comments on commit 2f04764

Please sign in to comment.