Skip to content

Merge pull request #420 from vmware/cluster-import-fix #2162

Merge pull request #420 from vmware/cluster-import-fix

Merge pull request #420 from vmware/cluster-import-fix #2162

Workflow file for this run

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@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