fix: CI e2e超时修复,减少spec数量 #31

Merged
hera merged 10 commits from fix/ci-timeout into main 2026-04-13 21:51:50 +00:00
Showing only changes of commit 14c41cd679 - Show all commits

View File

@@ -12,7 +12,7 @@ jobs:
e2e-test:
runs-on: test
needs: unit-test
timeout-minutes: 5
timeout-minutes: 8
steps:
- uses: actions/checkout@v4
@@ -58,17 +58,10 @@ jobs:
exit 1
fi
# Run core cypress specs with hard 3-minute timeout
# Run all specs with memory optimization
cd frontend
timeout 180 npx cypress run --spec "\
cypress/e2e/recipe-detail.cy.js,\
cypress/e2e/oil-reference.cy.js,\
cypress/e2e/oil-data-integrity.cy.js,\
cypress/e2e/recipe-cost-parity.cy.js,\
cypress/e2e/category-modules.cy.js,\
cypress/e2e/notification-flow.cy.js,\
cypress/e2e/registration-flow.cy.js\
" --config "video=false,defaultCommandTimeout=5000,pageLoadTimeout=10000,requestTimeout=5000,responseTimeout=10000,baseUrl=http://localhost:$FE_PORT"
timeout 300 npx cypress run \
--config "video=false,defaultCommandTimeout=5000,pageLoadTimeout=10000,requestTimeout=5000,responseTimeout=10000,baseUrl=http://localhost:$FE_PORT,experimentalMemoryManagement=true,numTestsKeptInMemory=0"
EXIT_CODE=$?
# Cleanup
@@ -76,7 +69,7 @@ jobs:
pkill -f "Cypress" 2>/dev/null || true
rm -f "$DB_FILE"
if [ $EXIT_CODE -eq 124 ]; then
echo "ERROR: Cypress timed out after 3 minutes"
echo "ERROR: Cypress timed out after 5 minutes"
exit 1
fi
exit $EXIT_CODE