build(deps): bump the minor-and-patch group across 1 directory with 5 updates #650
This file contains hidden or 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: Code | |
on: | |
pull_request: | |
paths-ignore: | |
- helm/** | |
- "**/*.md" | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
static-analysis: | |
name: Static Analysis | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- name: Run controller-gen | |
run: make generate | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v7 | |
with: | |
version: latest | |
only-new-issues: true | |
args: --timeout 5m --verbose | |
#args: --issues-exit-code=0 | |
#skip-cache: true | |
#skip-build-cache: true | |
#skip-pkg-cache: true | |
unit-testing: | |
name: Unit Testing | |
strategy: | |
matrix: | |
kubernetes-version: ['1.24', '1.25', '1.26', '1.27', '1.28', '1.29'] | |
runs-on: ubuntu-22.04 | |
env: | |
ENVTEST_K8S_VERSION: ${{ matrix.kubernetes-version }} | |
DOCKER_CLIENT_API_VERSION: '1.43' # 1.45 is not supported by ubuntu-22.04 GitHub image | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- name: Restore cached Go modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Run unit tests | |
run: | | |
set -euo pipefail | |
make test | |
go tool cover -html=cover.out -o coverage.html | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report-${{ matrix.kubernetes-version }} | |
path: coverage.html |