Skip to content

Commit 4f3e14a

Browse files
committed
ci: run tests during pre-commit
1 parent 213758f commit 4f3e14a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@ repos:
88
files: ^assets/img/posts/
99
exclude: lqip.jpg
1010
types: [image]
11-
pass_filenames: true
11+
pass_filenames: true
12+
- id: test-posts
13+
name: Test posts
14+
entry: ./tools/test.sh
15+
language: script
16+
pass_filenames: false
17+
always_run: true

tools/test.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,14 @@ while (($#)); do
7575
shift
7676
;;
7777
-h | --help)
78+
echo "hi"
7879
help
7980
exit 0
8081
;;
8182
*)
83+
echo "foo"
84+
echo $@
85+
echo "bar"
8286
# unknown option
8387
help
8488
exit 1

0 commit comments

Comments
 (0)