ci: optimize test performance — from ~3h to 3.5s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
Run Tests on Branches / Detect Changes (push) Successful in 13s

- Lazy-load tesseract.js only in OCR route (skips 30MB WASM download)
- Conditional tracing.js import (skip OTel gRPC in test mode)
- Remove unused barcode-detector import
- Add testTimeout/openHandlesTimeout to jest.config.js
- Add --forceExitTimeout=30000 to test script
- Split CI test jobs into parallel workflows (backend/frontend/mobile)
- Add timeout-minutes: 15 to all test jobs
- Use npm ci --ignore-scripts + selective native rebuild
This commit is contained in:
Antoni Nuñez Romeu
2026-07-14 12:42:02 +02:00
parent 4370d3c35c
commit e3db56715b
5 changed files with 79 additions and 29 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
"migrate": "node migrate.js",
"reset-db": "bash reset-db.sh",
"import-farmacias": "node import-farmacias.js",
"test": "NODE_OPTIONS='--experimental-vm-modules' npx jest --forceExit"
"test": "NODE_OPTIONS='--experimental-vm-modules' npx jest --ci --forceExit --forceExitTimeout=30000"
},
"keywords": [],
"author": "",