-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d87a0a
commit be57ef0
Showing
4 changed files
with
58 additions
and
16 deletions.
There are no files selected for viewing
19 changes: 16 additions & 3 deletions
19
.github/workflows/canopeum_backend.yml → ...kflows/canopeum_backend_pr_validation.yml
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
6 changes: 3 additions & 3 deletions
6
.github/workflows/canopeum_frontend.yml → ...flows/canopeum_frontend_pr_validation.yml
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
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
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,21 @@ | ||
# This should preferably go in a test folder. But we only have a single test for now | ||
# Tests are auto-discovered as long as they're named test*.py | ||
from io import StringIO | ||
|
||
from django.core.management import call_command | ||
from django.test import TestCase as DBTestCase | ||
|
||
|
||
class PendingMigrationsTests(DBTestCase): | ||
def test_no_pending_migrations(self): | ||
out = StringIO() | ||
try: | ||
# https://docs.djangoproject.com/en/5.1/ref/django-admin/#cmdoption-makemigrations-check | ||
call_command( | ||
"makemigrations", | ||
"--check", | ||
stdout=out, | ||
stderr=StringIO(), | ||
) | ||
except SystemExit: | ||
raise AssertionError("Pending migrations:\n" + out.getvalue()) from None |