Fix policy docs for different scopes for different policies #2319
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: Test and coverage | |
on: [pull_request, push] | |
env: | |
BUILD_TAGS: 'akscluster cluster clustergroup credential ekscluster gitrepository iampolicy kustomization namespace custompolicy imagepolicy networkpolicy quotapolicy securitypolicy sourcesecret workspace tanzupackage tanzupackages packagerepository packageinstall clustersecret integration mutationpolicy backupschedule targetlocation dataprotection tanzukubernetescluster clusterclass managementcluster provisioner inspections custompolicytemplate customiamrole permissiontemplate' | |
jobs: | |
build: | |
name: Test and coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.19 | |
- 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 coverage to Codecov | |
uses: codecov/codecov-action@v4 |