Fix kustomize api change & fix dep updates (#327) #221
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: "Build" | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
permissions: | |
contents: read | |
pull-requests: read | |
env: | |
GO_VERSION: 1.23 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up GO ${{env.GO_VERSION}}.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{env.GO_VERSION}} | |
check-latest: true | |
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Setup Environment | |
run: make ci-build-setup | |
- name: Build | |
run: make build | |
test: | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up GO ${{env.GO_VERSION}}.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{env.GO_VERSION}} | |
check-latest: true | |
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Setup Environment | |
run: make ci-build-setup | |
- name: Run unit tests | |
run: make test | |
- name: Archive code coverage report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-code-coverage-report | |
path: build/test-coverage.html | |
testacc: | |
strategy: | |
matrix: | |
k3s_version: | |
- v1.31.2-k3s1 | |
- v1.30.6-k3s1 | |
- v1.29.10-k3s1 | |
- v1.28.15-k3s1 | |
- v1.27.16-k3s1 | |
- v1.26.15-k3s1 | |
- v1.25.16-k3s4 | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up GO ${{env.GO_VERSION}}.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{env.GO_VERSION}} | |
check-latest: true | |
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Setup Environment | |
run: make ci-build-setup | |
- name: Start k3s | |
run: make k3s-start | |
env: | |
K3S_VERSION: ${{ matrix.k3s_version }} | |
- name: Run acceptance tests | |
run: make testacc | |
- name: Stop k3s | |
run: make k3s-stop | |
- name: Archive code coverage report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: testacc-${{matrix.k3s_version}}-code-coverage-report | |
path: build/testacc-coverage.html | |
fmtcheck: | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up GO ${{env.GO_VERSION}}.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{env.GO_VERSION}} | |
check-latest: true | |
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Setup Environment | |
run: make ci-build-setup | |
- name: Format check | |
run: make fmtcheck | |
vet: | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up GO ${{env.GO_VERSION}}.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{env.GO_VERSION}} | |
check-latest: true | |
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Setup Environment | |
run: make ci-build-setup | |
- name: Run vet | |
run: make vet | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up GO ${{env.GO_VERSION}}.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{env.GO_VERSION}} | |
check-latest: true | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.60 |