From 0f21e3aeb1e72a312482e59b626e03fafeaa9b17 Mon Sep 17 00:00:00 2001 From: Jonathan Metz Date: Sat, 24 Aug 2024 21:14:34 -0700 Subject: [PATCH] Check DB migrations in github ci --- {{cookiecutter.project_slug}}/.github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml index 5cb9ead4f..0d8ed0cad 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml @@ -74,6 +74,9 @@ jobs: - name: Build the docs run: docker compose -f docker-compose.docs.yml build docs + - name: Check DB Migrations + run: docker compose -f docker-compose.local.yml run --rm django python manage.py makemigrations --check + - name: Run DB Migrations run: docker compose -f docker-compose.local.yml run --rm django python manage.py migrate @@ -98,6 +101,12 @@ jobs: python -m pip install --upgrade pip pip install -r requirements/local.txt + - name: Check DB Migrations + run: python manage.py makemigrations --check + + - name: Run DB Migrations + run: python manage.py migrate + - name: Test with pytest run: pytest {%- endif %}