Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Sep 6, 2023
1 parent 09becc0 commit 9a4b78d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,8 @@ docker/docker-compose.prod.yml
# JetBrains
.idea/

# import-linter
.import_linter_cache/

# Release script:
release.config.js
2 changes: 1 addition & 1 deletion docker/django/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ run_ci () {
python manage.py makemigrations --dry-run --check

# Check that all migrations are backwards compatible:
python manage.py lintmigrations --exclude-apps=axes --warnings-as-errors
python manage.py lintmigrations --warnings-as-errors

# Check production settings for gunicorn:
gunicorn --check-config --config python:docker.django.gunicorn_config \
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/template/linters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ That's how this check is executed:

.. code:: bash
python manage.py lintmigrations --exclude-apps=axes
python manage.py lintmigrations
Important note: you might want to exclude some packages with broken migrations.
Sometimes, there's nothing we can do about it.
Expand Down
2 changes: 1 addition & 1 deletion server/common/pydantic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ class BaseModel(pydantic.BaseModel):
"""Base immutable model for our internal use."""

class Config(object):
allow_mutation = False
frozen = True
5 changes: 5 additions & 0 deletions server/settings/environments/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ def _custom_show_toolbar(request: 'HttpRequest') -> bool:
('axes', '*'),
))

MIGRATION_LINTER_OPTIONS = {
'exclude_apps': ['axes'],
'exclude_migration_tests': ['CREATE_INDEX', 'CREATE_INDEX_EXCLUSIVE'],
}


# django-extra-checks
# https://github.com/kalekseev/django-extra-checks
Expand Down

0 comments on commit 9a4b78d

Please sign in to comment.