Add operational handlers for CG k8s secret. #944
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' | |
jobs: | |
build: | |
name: Test and coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
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@v3 |