unit tests fixin
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m0s
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m0s
This commit is contained in:
@@ -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: |
|
||||
|
||||
Reference in New Issue
Block a user