This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +17
-13
lines changed Expand file tree Collapse file tree 5 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 47
47
hooks :
48
48
- id : prettier
49
49
types : [yaml]
50
+ - repo : https://github.com/koalaman/shellcheck-precommit
51
+ rev : v0.8.0
52
+ hooks :
53
+ - id : shellcheck
Original file line number Diff line number Diff line change @@ -9,20 +9,20 @@ endcol="\e[0m"
9
9
# $ ./test/run_test.sh test/audio_integration_test.py
10
10
# ```
11
11
if [ $# -ge 1 ]; then
12
- TEST_ARG=" $@ "
12
+ TEST_ARG=( " $@ " )
13
13
else
14
- TEST_ARG=" test/"
14
+ TEST_ARG=( " test/" )
15
15
fi
16
16
17
17
PYTHONWARNINGS=" ignore:Unverified HTTPS request" \
18
18
PYTHONPATH=. \
19
- pytest -s --disable-pytest-warnings $ TEST_ARG
19
+ pytest -s --disable-pytest-warnings " ${ TEST_ARG[@]} "
20
20
21
21
succeeded=$?
22
22
if [[ $succeeded -eq 0 ]]; then
23
- printf " ${green} :-) All tests passed${endcol} \n"
23
+ printf " %b :-) All tests passed${endcol} \n" " ${green} "
24
24
else
25
- printf " \n\n${red} :'( Some tests did not pass${endcol} \n"
25
+ printf " \n\n%b :'( Some tests did not pass${endcol} \n" " ${red} "
26
26
printf " Hint: \` just logs [service]\` will print the Docker logs and may be helpful for debugging.\n\n"
27
27
fi
28
28
exit $succeeded
Original file line number Diff line number Diff line change @@ -9,19 +9,19 @@ endcol="\e[0m"
9
9
# $ ./test/run_test.sh test/unit_test.py
10
10
# ```
11
11
if [ $# -ge 1 ]; then
12
- TEST_ARG=" $@ "
12
+ TEST_ARG=( " $@ " )
13
13
else
14
- TEST_ARG=" test/"
14
+ TEST_ARG=( " test/" )
15
15
fi
16
16
17
17
PYTHONWARNINGS=" ignore:Unverified HTTPS request" \
18
18
PYTHONPATH=. \
19
- pytest -sx -vv --disable-pytest-warnings $ TEST_ARG
19
+ pytest -sx -vv --disable-pytest-warnings " ${ TEST_ARG[@]} "
20
20
21
21
succeeded=$?
22
22
if [[ $succeeded -eq 0 ]]; then
23
- printf " ${green} :-) All tests passed${endcol} \n"
23
+ printf " %b :-) All tests passed${endcol} \n" " ${green} "
24
24
else
25
- printf " ${red} :'( Some tests did not pass${endcol} \n"
25
+ printf " \n\n%b :'( Some tests did not pass${endcol} \n" " ${red} "
26
26
fi
27
27
exit $succeeded
Original file line number Diff line number Diff line change @@ -40,4 +40,4 @@ docker run \
40
40
41
41
green=" \e[32m"
42
42
endcol=" \e[0m"
43
- printf " ${green} :-) Exported new mock data${endcol} \n"
43
+ printf " %b :-) Exported new mock data${endcol} \n" " ${green} "
Original file line number Diff line number Diff line change @@ -112,8 +112,8 @@ just wait-for-index "audio"
112
112
set +e
113
113
while true ; do
114
114
just ingest-upstream " image" " init"
115
- just wait-for-index " image-init"
116
- if [ $? -eq 0 ] ; then
115
+ if just wait-for-index " image-init"
116
+ then
117
117
break
118
118
fi
119
119
(( c++ )) && (( c== 3 )) && break
You can’t perform that action at this time.
0 commit comments