Skip to content

Commit c7f7b38

Browse files
committedNov 25, 2021
exclude sh tests that require resh to be installed from actions
1 parent c0a897d commit c7f7b38

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed
 

‎.github/workflows/sh.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@ jobs:
1313
- name: Check out code into the Go module directory
1414
uses: actions/checkout@v2
1515

16-
- name: Checkout submodules
17-
run: git submodule update --init --recursive
18-
1916
- name: Test
2017
run: scripts/test.sh

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ install: build
1414
test:
1515
go test -v ./...
1616
go vet ./...
17-
scripts/test.sh
17+
scripts/test.sh --all
1818

1919
rebuild:
2020
make clean

‎scripts/test.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ for f in scripts/{shellrc,util,reshctl,hooks}.sh; do
1414
! zsh -n "$f" && echo "Zsh syntax check failed!" && exit 1
1515
done
1616

17-
for sh in bash zsh; do
18-
echo "Running functions in scripts/shellrc.sh using $sh ..."
19-
! $sh -c ". scripts/shellrc.sh; __resh_preexec; __resh_precmd" && echo "Error while running functions!" && exit 1
20-
done
17+
if [ "$1" == "--all" ]; then
18+
for sh in bash zsh; do
19+
echo "Running functions in scripts/shellrc.sh using $sh ..."
20+
! $sh -c ". scripts/shellrc.sh; __resh_preexec; __resh_precmd" && echo "Error while running functions!" && exit 1
21+
done
22+
fi
2123

2224
# TODO: test installation
2325

0 commit comments

Comments
 (0)