unit tests fixin
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m0s

This commit is contained in:
2025-11-22 01:59:44 -08:00
parent 5312944dd2
commit f9846b60bd

View File

@@ -47,6 +47,24 @@ jobs:
- name: Install Dependencies
run: npm ci # 'ci' is faster and safer for CI/CD than 'install'.
# -----------------------------------------------------------------------
# ADD THIS NEW STEP HERE
# -----------------------------------------------------------------------
- name: Fix Package Scripts for CI
run: |
npm pkg set scripts.test:integration="vitest run -c vitest.config.integration.ts"
npm pkg set scripts.start:server="ts-node --esm server.ts"
# Also ensure test files are moved if they haven't been committed yet
# This prevents the 'Run Unit Tests' step from crashing on integration files
if [ -f src/services/db.test.ts ]; then
mv src/services/db.test.ts src/services/db.integration.test.ts
fi
if [ -f src/services/shopping-list.test.ts ]; then
mv src/services/shopping-list.test.ts src/services/shopping-list.integration.test.ts
fi
# -----------------------------------------------------------------------
# --- NEW DEBUGGING STEPS ---
- name: Verify Project Structure
run: |