fix(MAT-273): add dummy env vars to CI so bot.py can be imported in tests
Some checks failed
Build & Deploy / test (push) Failing after 10s
Build & Deploy / build-and-deploy (push) Has been skipped
Tests / test (push) Failing after 8s

test_needs_query_rewrite imports Bot from bot.py which reads
MATRIX_HOMESERVER etc. at module level — KeyError in CI where those
vars are not set. This has blocked all deploys since c2985488.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-04-16 13:19:56 +03:00
parent ae2f34a3b6
commit 6d79b184b9
2 changed files with 14 additions and 0 deletions

View File

@@ -19,6 +19,13 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pip install -r requirements.txt -r requirements-test.txt run: pip install -r requirements.txt -r requirements-test.txt
- name: Run tests - name: Run tests
env:
MATRIX_HOMESERVER: https://test.local
MATRIX_BOT_USER: "@test:test.local"
MATRIX_BOT_PASSWORD: test
LIVEKIT_URL: wss://test.local
LIVEKIT_API_KEY: test
LIVEKIT_API_SECRET: test
run: pytest tests/ -v --cov=device_trust --cov-report=term run: pytest tests/ -v --cov=device_trust --cov-report=term
build-and-deploy: build-and-deploy:
needs: [test] needs: [test]

View File

@@ -17,5 +17,12 @@ jobs:
run: | run: |
pip install -r requirements.txt -r requirements-test.txt pip install -r requirements.txt -r requirements-test.txt
- name: Run tests - name: Run tests
env:
MATRIX_HOMESERVER: https://test.local
MATRIX_BOT_USER: "@test:test.local"
MATRIX_BOT_PASSWORD: test
LIVEKIT_URL: wss://test.local
LIVEKIT_API_KEY: test
LIVEKIT_API_SECRET: test
run: | run: |
pytest tests/ -v --cov=device_trust --cov-report=term pytest tests/ -v --cov=device_trust --cov-report=term