diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 29718ff6..8407ea96 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -80,6 +80,10 @@ jobs: # Run tests make test + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Cleanup if: ${{ always() }} run: | diff --git a/.github/workflows/run-acceptance-tests.yaml b/.github/workflows/run-acceptance-tests.yaml index 0ff54b78..7ca46f8b 100644 --- a/.github/workflows/run-acceptance-tests.yaml +++ b/.github/workflows/run-acceptance-tests.yaml @@ -88,6 +88,10 @@ jobs: # Run tests make test + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Cleanup if: ${{ always() }} run: | diff --git a/Makefile b/Makefile index 32bd62c1..d59fbccc 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ push-image: test: codegen download-test-deps KUBEBUILDER_ASSETS="$(shell setup-envtest --use-env use -p path)" \ - go run github.com/onsi/ginkgo/v2/ginkgo -nodes=${TEST_NODES} --randomize-all -v ./... + go run github.com/onsi/ginkgo/v2/ginkgo -nodes=${TEST_NODES} --randomize-all -v -coverprofile="coverage.txt" -coverpkg=./... ./... deploy: kubectl apply -f deploy/yaml/service_account.yaml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..bfdc9877 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,8 @@ +coverage: + status: + project: + default: + informational: true + patch: + default: + informational: true