-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.json
More file actions
34 lines (34 loc) · 2.36 KB
/
package.json
File metadata and controls
34 lines (34 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
"name": "agri-testtools-demo",
"private": true,
"workspaces": [
"frontend",
"backend",
"tests/e2e"
],
"scripts": {
"install:all": "npm install --workspaces",
"dev": "npm run dev --workspace backend",
"dev:frontend": "npm run dev --workspace frontend",
"dev:backend": "npm run dev --workspace backend",
"build": "npm run build --workspace backend && npm run build --workspace frontend",
"build:backend": "npm run build --workspace backend",
"build:frontend": "npm run build --workspace frontend",
"test": "npm run test --workspace backend && npm run test --workspace frontend",
"test:unit:backend": "npm run test --workspace backend",
"test:unit:frontend": "npm run test --workspace frontend",
"test:unit:backend:report": "sh -c 'mkdir -p reports/backend && npm run test --workspace backend -- --coverageReporters=text --coverageReporters=json-summary && cp backend/coverage/coverage-summary.json reports/backend/coverage-summary.json'",
"test:unit:frontend:report": "sh -c 'mkdir -p reports/frontend && npm run test:coverage --workspace frontend && cp frontend/coverage/coverage-summary.json reports/frontend/coverage-summary.json'",
"test:e2e": "npm run test --workspace tests/e2e",
"test:e2e:report": "sh -c 'mkdir -p reports/e2e && npm run test:report --workspace tests/e2e'",
"test:perf": "sh -c 'docker run --rm -v \"$(pwd)/tests/perf:/scripts\" grafana/k6 run -e API_URL=\"${API_URL:-http://host.docker.internal:3000/api}\" /scripts/api-load.js'",
"test:perf:report": "sh -c 'mkdir -p reports/perf && docker run --rm -v \"$(pwd)/tests/perf:/scripts\" -v \"$(pwd)/reports/perf:/reports\" grafana/k6 run --summary-export /reports/k6-summary.json -e API_URL=\"${API_URL:-http://host.docker.internal:3000/api}\" /scripts/api-load.js'",
"test:all:report": "npm run test:unit:backend:report && npm run test:unit:frontend:report && npm run test:e2e:report && npm run test:perf:report && npm run report:generate",
"report:generate": "python3 reports/generate_report.py",
"lint": "npm run lint --workspace backend && npm run lint --workspace frontend",
"demo:stack:up": "docker compose up --build -d",
"demo:stack:down": "docker compose down",
"demo:test:all-local": "npm run test:unit:backend && npm run test:unit:frontend",
"ci": "npm run lint && npm run demo:test:all-local && npm run build"
}
}