-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github workflow for analytics migrations
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Check Analytics Migrations | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "analytics/**" | ||
|
||
jobs: | ||
check-migrations: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install requirements | ||
run: pip install -r ./analytics/requirements.txt | ||
|
||
- name: Provide default env vars for django | ||
run: cat ./analytics/dev/.env.docker-compose >> $GITHUB_ENV | ||
|
||
# This runs on pull requests and blocks until any necessary migrations have been created | ||
# *Note*: This will display a warning about not being able to connect to a database. This can be ignored. | ||
- name: Check for Migrations | ||
run: ./analytics/manage.py makemigrations --check --noinput |