This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
gaugendre
/
blog
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Activity
Browse Source
Run precommit and check for missing migrations during tests
http2
Gabriel Augendre
5 months ago
parent
df5fb508ab
commit
3cff6619cb
No known key found for this signature in database
GPG Key ID:
1E693F4CE4AEE7B4
3 changed files
with
7 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+0
-1
.dockerignore
+2
-0
docker/runtests.sh
+5
-1
tests.Dockerfile
+ 0
- 1
.dockerignore
View File
@ -2,5 +2,4 @@ db/
media/
staticfiles/
.pytest_cache/
.git/
.idea/
+ 2
- 0
docker/runtests.sh
View File
@ -1,2 +1,4 @@
#!/bin/sh
TESTING
=
true
python -m pytest
pre-commit run --all-files
TESTING
=
true
python manage.py makemigrations --check
+ 5
- 1
tests.Dockerfile
View File
@ -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"]
Write
Preview
Loading…
Cancel
Save