Update golang.org/x/exp digest to c0f41cb (#261) #1469
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 and run tests | |
# This workflow is triggered on pushes to the repository. | |
on: [push, pull_request] | |
env: | |
GOTOOLCHAIN: local | |
jobs: | |
lint: | |
# This job runs on Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
check-latest: true | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
# always uses the latest patch version. | |
version: v1.55 | |
args: "--timeout 5m" | |
vulncheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
check-latest: true | |
- name: Install govulncheck | |
run: go install golang.org/x/vuln/cmd/govulncheck@latest | |
- name: Run govulncheck | |
run: govulncheck ./... | |
test: | |
# This job runs on Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
check-latest: true | |
- name: Cache testbin binaries | |
id: cache-testbin | |
uses: actions/cache@v4 | |
with: | |
path: testbin | |
# Use SHA-256 hash of the Makefile file as the key. | |
# Swapping testbinary versions usally requrie to change the Makefile | |
key: ${{ runner.os }}-kubebuilder-${{ hashFiles('Makefile') }} | |
- name: Install Ginkgo CLI | |
run: go install github.com/onsi/ginkgo/v2/[email protected] | |
- name: Run tests and generate coverage | |
run: | | |
ENVTEST_K8S_VERSION=1.25.0 make test -o lint | |
- name: Upload coverage results to coveralls | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
path-to-profile: coverprofile.out |