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

This commit is contained in:
2025-11-22 01:16:45 -08:00
parent b5b8d758b7
commit 3b21426b1b

View File

@@ -18,6 +18,7 @@ jobs:
# These must be configured as secrets in your Gitea repository settings.
env:
# Public keys needed for the React build process.
# (Empty in original, assuming secrets are injected below)
steps:
- name: Checkout Code
@@ -70,6 +71,7 @@ jobs:
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_DATABASE: "flyer-crawler-test" # Hardcode the test database name
DB_NAME: "flyer-crawler-test" # REQUIRED: Used by connection.ts to match the test setup
run: npm test # Run the test suite against the temporary test database.
# also Run the test suite to ensure code correctness.
@@ -81,6 +83,7 @@ jobs:
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_DATABASE: "flyer-crawler-test"
DB_NAME: "flyer-crawler-test" # REQUIRED: Used by connection.ts
JWT_SECRET: "test-secret-for-ci" # Use a fixed secret for CI
run: npm run test:integration
@@ -106,4 +109,4 @@ jobs:
# The '--delete' flag removes old files from the destination, ensuring a clean deployment.
# We exclude '.env.local' to prevent deleting the server-specific environment file.
rsync -avz --delete --exclude '.env.local' dist/ "/var/www/flyer-crawler.projectium.com"
echo "Local deployment complete."
echo "Local deployment complete."