Move the test for reatest to suite_test.go (#136) #111
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Basic Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18.1 | |
- name: Set up Minikube | |
uses: manusa/actions-setup-minikube@v2.3.0 | |
with: | |
minikube version: v1.26.0 | |
kubernetes version: v1.24.0 | |
driver: docker | |
- name: Setup KUBEBUILDER_ASSETS | |
run: | | |
export K8S_VERSION=1.20.2 | |
curl -sSLo envtest-bins.tar.gz "https://go.kubebuilder.io/test-tools/${K8S_VERSION}/$(go env GOOS)/$(go env GOARCH)" | |
sudo mkdir /usr/local/kubebuilder | |
sudo tar -C /usr/local/kubebuilder --strip-components=1 -zvxf envtest-bins.tar.gz | |
sudo cp /usr/local/kubebuilder/bin/* /usr/local/bin | |
- name: Make controller-gen | |
run: make controller-gen | |
- name: Set up vendor | |
run: go mod vendor | |
- name: Basic Operator's Tests | |
run: KUBEBUILDER_ASSETS=/usr/local/bin go test -timeout 60m ./... -coverprofile cover.out |