Skip to content

Commit

Permalink
🤖 ci: format, lint, build, and run tests before each commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayanTheNerd committed Aug 19, 2024
1 parent 3a0ceec commit 9457179
Show file tree
Hide file tree
Showing 2 changed files with 212 additions and 62 deletions.
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
"format": "prettier --write '**/*.{json,md,css,astro}' --config=prettier.config.js --cache",
"lint": "eslint --fix --ignore-pattern='.vscode/*.json' --config=eslint.config.js --cache-location='/node_modules/.eslintcache/",
"test:unit": "vitest --config=vitest.config.ts",
"test:e2e": "concurrently \"pnpm dev\" \"cypress open\" --kill-others",
"test:e2e:ci": "concurrently \"pnpm preview\" \"cypress run --headed\" --kill-others",
"all": "pnpm format && pnpm lint && pnpm test:unit --run && pnpm build && pnpm test:e2e:ci"
"test:e2e": "start-server-and-test dev http://127.0.0.1:3000/image-editor 'cypress open'",
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:3000/image-editor 'cypress run'"
},
"simple-git-hooks": {
"pre-commit": "pnpm format && pnpm lint && pnpm test:unit --run && pnpm build && pnpm test:e2e:ci"
},
"dependencies": {
"@formkit/auto-animate": "^0.8.1",
Expand All @@ -40,7 +42,6 @@
"@types/eslint__js": "^8.42.3",
"astro": "^4.4.15",
"browserslist": "^4.23.0",
"concurrently": "^8.2.2",
"cypress": "^13.13.3",
"cypress-vite": "^1.5.0",
"eslint": "^9.8.0",
Expand All @@ -49,6 +50,8 @@
"lightningcss": "^1.24.0",
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.14.0",
"simple-git-hooks": "^2.11.1",
"start-server-and-test": "^2.0.5",
"vitest": "^2.0.4"
}
}
Loading

0 comments on commit 9457179

Please sign in to comment.