From f457d6d66fdf39dd04bda653b527677d02482250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lapeyre?= Date: Fri, 1 Sep 2023 17:43:21 +0200 Subject: [PATCH] Run the tests in CI (#97) * Run the tests in CI When can remove this before merging on master but it would be good to have the CI working on our branch * Backport of 5283f33 --- .github/workflows/go.yml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) 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