Run precommit and check for missing migrations during tests
This commit is contained in:
parent
df5fb508ab
commit
3cff6619cb
3 changed files with 7 additions and 2 deletions
|
@ -2,5 +2,4 @@ db/
|
||||||
media/
|
media/
|
||||||
staticfiles/
|
staticfiles/
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
.git/
|
|
||||||
.idea/
|
.idea/
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
TESTING=true python -m pytest
|
TESTING=true python -m pytest
|
||||||
|
pre-commit run --all-files
|
||||||
|
TESTING=true python manage.py makemigrations --check
|
||||||
|
|
|
@ -3,4 +3,8 @@ RUN pip install -r requirements-dev.txt
|
||||||
ENV TESTING "true"
|
ENV TESTING "true"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
HEALTHCHECK none
|
HEALTHCHECK none
|
||||||
CMD ["python", "-m", "pytest"]
|
# Required for pre-commit
|
||||||
|
RUN apt-get install -y git
|
||||||
|
COPY .git ./.git/
|
||||||
|
|
||||||
|
CMD ["/app/docker/runtests.sh"]
|
||||||
|
|
Reference in a new issue