Skip to content

chore: upgrade to golangci-lint v2 (#533) #2691

chore: upgrade to golangci-lint v2 (#533)

chore: upgrade to golangci-lint v2 (#533) #2691

Workflow file for this run

---
name: Test
on:
pull_request:
paths-ignore:
- 'README.md'
push:
paths-ignore:
- 'README.md'
env:
BUILD_TAGS: 'akscluster cluster clustergroup credential ekscluster gitrepository iampolicy kustomization namespace custompolicy imagepolicy networkpolicy quotapolicy securitypolicy sourcesecret workspace tanzupackage tanzupackages packagerepository packageinstall clustersecret mutationpolicy backupschedule targetlocation dataprotection tanzukubernetescluster clusterclass managementcluster provisioner inspections custompolicytemplate customiamrole permissiontemplate'
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version-file: 'go.mod'
cache: true
- name: Build
run: |
go build -v ./...
- name: Unit Test
run: |
go test $(go list ./... | grep -v /internal/client | grep -v /internal/models) -coverprofile=coverage.out -covermode=atomic
- name: Mock Test
run: |
go test $(go list ./... | grep -v /internal/client | grep -v /internal/models) -tags $BUILD_TAGS
- name: Upload to Codecov
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0