mirror of
https://github.com/rancher/k3k.git
synced 2026-08-20 04:46:19 +00:00
* goreleaser action * removed old release * fix gomega version in tests * updated build workflow * fix for empty var
42 lines
856 B
YAML
42 lines
856 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Check go modules
|
|
run: |
|
|
go mod tidy
|
|
test -z "$(git status --porcelain)"
|
|
|
|
- name: Install tools
|
|
run: |
|
|
go install github.com/onsi/ginkgo/v2/ginkgo
|
|
|
|
# With Golang 1.22 we need to use the release-0.18 branch
|
|
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.18
|
|
|
|
ENVTEST_BIN=$(setup-envtest use -p path)
|
|
sudo mkdir -p /usr/local/kubebuilder/bin
|
|
sudo cp $ENVTEST_BIN/* /usr/local/kubebuilder/bin
|
|
|
|
- name: Run tests
|
|
run: |
|
|
ginkgo run ./...
|