Update golang Docker tag to v1.23 #98
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: envtest | |
on: | |
pull_request: | |
branches: | |
- 'master' | |
push: | |
branches: | |
- 'master' | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_BUILDKIT: "1" | |
steps: | |
- | |
# https://github.com/actions/checkout | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: UnitTest | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y zfsutils-linux | |
sudo truncate -s 2G /disk.img | |
sudo zpool create tank /disk.img | |
sudo zfs create tank/envtest | |
LOCALBIN=$(pwd)/bin | |
ENVTEST=${LOCALBIN}/setup-envtest | |
ENVTEST_K8S_VERSION=1.25.0 | |
GOBIN=${LOCALBIN} go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest | |
sudo KUBEBUILDER_ASSETS="$(${ENVTEST} use ${ENVTEST_K8S_VERSION} --bin-dir ${LOCALBIN} -p path)" go test ./... -coverprofile cover.out |