From f9846b60bd04a28e25a332e9b5dc9f5e75d37dab Mon Sep 17 00:00:00 2001 From: Torben Sorensen Date: Sat, 22 Nov 2025 01:59:44 -0800 Subject: [PATCH] unit tests fixin --- .gitea/workflows/deploy.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 4ee6194f..51d9db3e 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -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: |