Skip to content

Commit 983631b

Browse files
committed
ci: change workflow to 'Lint, Test and Build'
remove build script from `npm test` and add it to workflow and huskys pre-push hook
1 parent c2c16f9 commit 983631b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/github-action-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test and Lint
1+
name: Lint, Test and Build
22
on:
33
push:
44
branches:
@@ -27,3 +27,4 @@ jobs:
2727
- run: npm ci
2828
- run: npm run lint
2929
- run: npm test
30+
- run: npm run build

.husky/pre-push

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
. "$(dirname "$0")/_/husky.sh"
33

44
npm test
5+
npm build

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"test": "npx karma start ./node_modules/@stackr23/webpack/karma && npm run build",
7+
"test": "npx karma start ./node_modules/@stackr23/webpack/karma",
88
"lint": "eslint --fix --ext \".js,.jsx,.ts,.tsx\" . --quiet --format pretty && prettier **/*.{css,scss,md,json} --write",
99
"clean": "rimraf build",
1010
"build": "npm run clean && webpack -p --mode production --env production",
@@ -24,7 +24,7 @@
2424
"husky": {
2525
"hooks": {
2626
"pre-commit": "lint-staged",
27-
"pre-push": "npm test"
27+
"pre-push": "npm test && npm run build"
2828
}
2929
},
3030
"lint-staged": {

0 commit comments

Comments
 (0)