Skip to content

Commit 4309338

Browse files
chore: update prepush hook to run build and test
1 parent 38a45f6 commit 4309338

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

.husky/pre-push

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
#!/bin/sh
2-
# yarn test
2+
[ -n "$CI" ] && exit 0
3+
4+
echo "Running build and tests..."
5+
yarn test && yarn build
6+
7+
if [ $? -ne 0 ]; then
8+
echo "Build or tests failed. Please fix errors before pushing."
9+
exit 1
10+
fi

.husky/prepare-commit-msg

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,4 @@ if [ -n "$2" ]; then
88
exit 0
99
fi
1010

11-
echo "Running linter..."
12-
yarn lint
13-
14-
# Check linter exit status
15-
if [ $? -ne 0 ]; then
16-
echo "Linting failed. Please fix lint errors before committing."
17-
exit 1
18-
else
19-
echo "Adding linted files to staging..."
20-
git add .
21-
fi
22-
2311
exec < /dev/tty && git cz --hook || true

0 commit comments

Comments
 (0)