Skip to content

Commit

Permalink
Run collectstatic before the tests in CI
Browse files Browse the repository at this point in the history
This stops WhiteNoise from emitting warnings about STATIC_ROOT not
existing.
The alternative would be to set WHITENOISE_AUTOREFRESH = True in the
settings. We currently don't have any settings that are only applied
in CI and I think it makes sense to keep it that way to have the test
environment as close to production as possible.

See evansd/whitenoise#191

Signed-off-by: Haiko Schol <hs@haikoschol.com>
  • Loading branch information
haikoschol committed Dec 19, 2019
1 parent 196b80c commit 78edaea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ before_script:
- ./manage.py migrate

script:
- ./manage.py collectstatic
- pytest

notifications:
Expand Down

0 comments on commit 78edaea

Please sign in to comment.