Skip to content

Commit

Permalink
exclude sh tests that require resh to be installed from actions
Browse files Browse the repository at this point in the history
  • Loading branch information
curusarn committed Nov 25, 2021
1 parent c0a897d commit c7f7b38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/sh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Test
run: scripts/test.sh
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ install: build
test:
go test -v ./...
go vet ./...
scripts/test.sh
scripts/test.sh --all

rebuild:
make clean
Expand Down
10 changes: 6 additions & 4 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ for f in scripts/{shellrc,util,reshctl,hooks}.sh; do
! zsh -n "$f" && echo "Zsh syntax check failed!" && exit 1
done

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

# TODO: test installation

Expand Down

0 comments on commit c7f7b38

Please sign in to comment.