CI: Build Vite assets for test workflow

This commit is contained in:
Adam Goldsmith 2024-08-16 00:22:05 -04:00
parent 8868c0b5ef
commit 02e86bd079
2 changed files with 16 additions and 0 deletions

View File

@ -36,5 +36,15 @@ jobs:
sudo apt-get -y install build-essential python3-dev libldap2-dev libsasl2-dev mariadb-client sudo apt-get -y install build-essential python3-dev libldap2-dev libsasl2-dev mariadb-client
- name: Install python dependencies - name: Install python dependencies
run: pdm sync -d -G dev run: pdm sync -d -G dev
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
run_install: |
- args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Build JS assets
run: pnpm run build
- name: Run tests - name: Run tests
run: pdm run -v ./manage.py test run: pdm run -v ./manage.py test

View File

@ -357,6 +357,12 @@ class CI(Base):
configure_hypothesis_profiles() configure_hypothesis_profiles()
settings.load_profile("ci") settings.load_profile("ci")
@property
def DJANGO_VITE(self):
d = super().DJANGO_VITE
d["default"]["manifest_path"] = BASE_DIR / "vite-dist" / "manifest.json"
return d
SECRET_KEY = "aed7jee2kai1we9eithae0gaegh9ohthoh4phahk5bau4Ahxaijo3aicheex3qua" SECRET_KEY = "aed7jee2kai1we9eithae0gaegh9ohthoh4phahk5bau4Ahxaijo3aicheex3qua"
DATABASES = { DATABASES = {