Run precommit and check for missing migrations during tests

pull/2/head
Gabriel Augendre 2 years ago
parent df5fb508ab
commit 3cff6619cb
No known key found for this signature in database
GPG Key ID: 1E693F4CE4AEE7B4
  1. 1
      .dockerignore
  2. 2
      docker/runtests.sh
  3. 6
      tests.Dockerfile

@ -2,5 +2,4 @@ db/
media/
staticfiles/
.pytest_cache/
.git/
.idea/

@ -1,2 +1,4 @@
#!/bin/sh
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"
WORKDIR /app
HEALTHCHECK none
CMD ["python", "-m", "pytest"]
# Required for pre-commit
RUN apt-get install -y git
COPY .git ./.git/
CMD ["/app/docker/runtests.sh"]

Loading…
Cancel
Save