fix: use correct Django settings for each service in CI

The static-assets-check workflow was setting DJANGO_SETTINGS_MODULE=lms.envs.production
globally, but then running both LMS and CMS collectstatic. Because manage.py doesn't
override DJANGO_SETTINGS_MODULE when it's already set (and --settings isn't passed),
CMS was running with LMS settings instead of CMS settings.

This meant CMS-specific RequireJS builds (cms/static/cms/js/build.js) were never being
tested, allowing issues like missing modules to slip through to sandbox deployments.

Fix by setting DJANGO_SETTINGS_MODULE explicitly for each service.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Feanil Patel
2026-02-02 14:43:27 -05:00
committed by Kyle McCormick
parent 7c9f468d56
commit cd7f2aeee1

View File

@@ -98,7 +98,6 @@ jobs:
env:
LMS_CFG: lms/envs/minimal.yml
CMS_CFG: lms/envs/minimal.yml
DJANGO_SETTINGS_MODULE: lms.envs.production
run: |
./manage.py lms collectstatic --noinput
./manage.py cms collectstatic --noinput
DJANGO_SETTINGS_MODULE=lms.envs.production ./manage.py lms collectstatic --noinput
DJANGO_SETTINGS_MODULE=cms.envs.production ./manage.py cms collectstatic --noinput