diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 78461d0..8133bdb 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,9 +2,9 @@ name: Go on: push: - branches: [ main ] + branches: [ main, saml-lib ] pull_request: - branches: [ main ] + branches: [ main, saml-lib ] jobs: @@ -30,7 +30,25 @@ jobs: fi - name: Build - run: find . -name go.mod -execdir go build ./... \; + run: | + set -e + exit_status= + for f in $(find . -name go.mod) + do + pushd $(dirname $f) > /dev/null + go build ./... || exit_status=$? + popd > /dev/null + done + exit $status - name: Test - run: find . -name go.mod -execdir go test ./... \; + run: | + set -e + exit_status= + for f in $(find . -name go.mod) + do + pushd $(dirname $f) > /dev/null + go test -test.v ./... || exit_status=$? + popd > /dev/null + done + exit $exit_status