From e6afb41e9335e2523302b39efae6d0226cc6c41c Mon Sep 17 00:00:00 2001 From: Ferenc Szabo Date: Mon, 2 Dec 2024 18:22:16 +0100 Subject: [PATCH] ci: run Go tests --- .github/workflows/continuous-integration.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 8068956..e62c8f1 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -37,8 +37,8 @@ jobs: # KLUDGE: plan/check-sanitized-value.rego needs to be ignored because it uses the custom sanitized() function find . -name \*.rego ! -regex '.*_test\.rego$' ! -path './examples/plan/check-sanitized-value.rego' -print0 | xargs -0 -n1 opa check --strict - unit-tests: - name: Unit Tests + opa-test: + name: OPA Tests runs-on: ubuntu-latest steps: @@ -56,3 +56,15 @@ jobs: for test in $tests; do opa test -v $test ${test/_test.rego/.rego} done + + go-test: + name: Go Tests + runs-on: ubuntu-latest + container: golang:1.23.3 + + steps: + - name: Check out + uses: actions/checkout@v4 + + - name: Run unit tests + run: go test -v ./...