Skip to content

Commit

Permalink
Run the tests in CI (#97)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
remilapeyre authored Sep 1, 2023
1 parent 984a901 commit f457d6d
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Go

on:
push:
branches: [ main ]
branches: [ main, saml-lib ]
pull_request:
branches: [ main ]
branches: [ main, saml-lib ]

jobs:

Expand All @@ -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

0 comments on commit f457d6d

Please sign in to comment.