Skip to content

Go Unit Tests

Go Unit Tests #1092

Workflow file for this run

name: Go Unit Tests
on:
push:
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: 0 0 * * *
jobs:
test:
runs-on: ubuntu-latest
env:
APISERVER_VERSION: 1.28.x
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Download kubebuilder assets
run: |
echo "KUBEBUILDER_ASSETS=$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use -p path $APISERVER_VERSION)" >> $GITHUB_ENV
- name: Run tests
run: go test -v ./...