- Add GitHub Actions CI workflow with lint, type-check, test, build, and e2e jobs - Configure Jest for unit and integration tests with coverage reporting - Create unit tests for BaseAgent, PlantLineageAgent, and AgentOrchestrator - Add blockchain PlantChain unit tests - Create API integration tests for plants endpoints - Configure Cypress for E2E testing with support files and custom commands - Add E2E tests for home, plant registration, transparency, and vertical farm pages - Set up Prettier for code formatting with configuration - Configure Husky pre-commit hooks with lint-staged - Add commitlint for conventional commit message enforcement - Update package.json with new scripts and dev dependencies This implements Agent 5 (Testing & CI/CD) from the deployment plan.
72 lines
2.1 KiB
JSON
72 lines
2.1 KiB
JSON
{
|
|
"name": "localgreenchain",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"dev": "next dev -p 3001",
|
|
"build": "next build",
|
|
"start": "next start -p 3001",
|
|
"preview": "bun run build && bun run start",
|
|
"lint": "next lint",
|
|
"lint:fix": "next lint --fix",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check .",
|
|
"type-check": "tsc --noEmit",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"test:coverage": "jest --coverage",
|
|
"test:ci": "jest --ci --coverage --reporters=default --reporters=jest-junit",
|
|
"cy:open": "cypress open",
|
|
"cy:run": "cypress run",
|
|
"test:e2e": "start-server-and-test 'bun run preview' http://localhost:3001 cy:open",
|
|
"test:e2e:ci": "start-server-and-test 'bun run preview' http://localhost:3001 cy:run",
|
|
"prepare": "husky install",
|
|
"validate": "bun run type-check && bun run lint && bun run test"
|
|
},
|
|
"dependencies": {
|
|
"@tailwindcss/forms": "^0.4.0",
|
|
"@tailwindcss/typography": "^0.5.1",
|
|
"@tanstack/react-query": "^4.0.10",
|
|
"classnames": "^2.3.1",
|
|
"drupal-jsonapi-params": "^1.2.2",
|
|
"html-react-parser": "^1.2.7",
|
|
"next": "^12.2.3",
|
|
"next-drupal": "^1.6.0",
|
|
"nprogress": "^0.2.0",
|
|
"react": "^17.0.2",
|
|
"react-dom": "^17.0.2",
|
|
"react-hook-form": "^7.8.6",
|
|
"socks-proxy-agent": "^8.0.2"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.12.9",
|
|
"@commitlint/cli": "^18.4.3",
|
|
"@commitlint/config-conventional": "^18.4.3",
|
|
"@types/jest": "^29.5.0",
|
|
"@types/node": "^17.0.21",
|
|
"@types/react": "^17.0.0",
|
|
"autoprefixer": "^10.4.2",
|
|
"cypress": "^13.6.0",
|
|
"eslint-config-next": "^12.0.10",
|
|
"husky": "^8.0.3",
|
|
"jest": "^29.5.0",
|
|
"jest-junit": "^16.0.0",
|
|
"lint-staged": "^15.2.0",
|
|
"postcss": "^8.4.5",
|
|
"prettier": "^3.1.0",
|
|
"start-server-and-test": "^2.0.3",
|
|
"tailwindcss": "^3.0.15",
|
|
"ts-jest": "^29.1.0",
|
|
"typescript": "^4.5.5"
|
|
},
|
|
"lint-staged": {
|
|
"*.{ts,tsx}": [
|
|
"eslint --fix",
|
|
"prettier --write"
|
|
],
|
|
"*.{json,md,css}": [
|
|
"prettier --write"
|
|
]
|
|
}
|
|
}
|