-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run Django checks (inc. missing migrations) as part of CI #7558
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good stuff for CI!
Django's test framework runs checks at the start of the test run. pytest-django is missing this. Could you merge this with |
@adamchainz If I move the checks into |
Yes. Running them multiple times is not really an issue since the overhead is measured in milliseconds. I think it's worth it for a simpler test structure, and it also means they'll be run locally without needing an extra environment, or thought about it. As I said, this is the default behaviour with Django's test framework and it should be pytest-django's behvaiour too - I just never quite figured out a good way of doing it - pytest-dev/pytest-django#414 . |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rebase please
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Description
Refs #7554/#7557
This PR adds a script called
runchecks.py
which is analagous toruntests.py
, but used to run Django admin checks as part of CI. This will fail if any errors are raised. In addition to a straight./manage.py check
command, it will run themakemigrations
command in "dry-run" mode, failing if any missing migrations are detected.It is equivalent to running these two commands:
Running this against the 3.12 release (missing a migration) gives this:
And returns with a non-zero exit code, thereby failing the Travis build.