diff --git a/.github/workflows/test-go.yaml b/.github/workflows/test-go.yaml new file mode 100644 index 00000000..5bda60b4 --- /dev/null +++ b/.github/workflows/test-go.yaml @@ -0,0 +1,18 @@ +name: Test Go +on: + pull_request: + merge_group: +jobs: + build: + name: Test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version-file: go.mod + + - name: Run tests + run: make test + shell: bash diff --git a/Makefile b/Makefile index 918056df..1a017fdc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ DYNAMIC_REGO_FOLDER=./rules/kubernetes/policies/dynamic +.PHONY: test +test: + go test -v ./... + .PHONY: schema schema: go run ./cmd/schema generate