diff --git a/.codecov.yaml b/.codecov.yaml index 45090097..ddadde8a 100644 --- a/.codecov.yaml +++ b/.codecov.yaml @@ -16,9 +16,12 @@ comment: behavior: default ignore: - "testdata" - - "**/zz_*generated*.go" + - "**/zz*_generated.go" - "templates" - "hack" - "test" + - "generate" + - "docs" + - "plugin" + - "schema" - "third_party" - diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5fd02cc1..5c467739 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,7 +41,7 @@ jobs: - uses: codecov/codecov-action@v5 with: files: ./coverage.txt - flags: unit-tests-${{ matrix.os }} + flags: unit-tests fail_ci_if_error: true verbose: true token: ${{ secrets.CODECOV_TOKEN }} @@ -130,7 +130,7 @@ jobs: - uses: codecov/codecov-action@v5 with: files: ./coverage.txt - flags: e2e-test + flags: e2e-tests fail_ci_if_error: true verbose: true token: ${{ secrets.CODECOV_TOKEN }} @@ -182,7 +182,7 @@ jobs: - uses: codecov/codecov-action@v5 with: files: ./coverage.txt - flags: e2e-test-oncluster + flags: e2e-tests fail_ci_if_error: true verbose: true token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/test-e2e-oncluster-runtime.yaml b/.github/workflows/test-e2e-oncluster-runtime.yaml index f6df83c8..f5709997 100644 --- a/.github/workflows/test-e2e-oncluster-runtime.yaml +++ b/.github/workflows/test-e2e-oncluster-runtime.yaml @@ -64,7 +64,3 @@ jobs: echo "::group::cluster containers logs" stern '.*' --all-namespaces --no-follow echo "::endgroup::" - - uses: codecov/codecov-action@v5 - with: - files: ./coverage.txt - flags: e2e-test-oncluster-runtime diff --git a/.github/workflows/test-e2e-oncluster.yaml b/.github/workflows/test-e2e-oncluster.yaml index ddba5874..625879d2 100644 --- a/.github/workflows/test-e2e-oncluster.yaml +++ b/.github/workflows/test-e2e-oncluster.yaml @@ -54,4 +54,4 @@ jobs: - uses: codecov/codecov-action@v5 with: files: ./coverage.txt - flags: e2e-test-oncluster + flags: e2e-tests diff --git a/.github/workflows/test-e2e-runtime.yaml b/.github/workflows/test-e2e-runtime.yaml index e0442c2e..7378979c 100644 --- a/.github/workflows/test-e2e-runtime.yaml +++ b/.github/workflows/test-e2e-runtime.yaml @@ -76,7 +76,3 @@ jobs: fi done echo "------------------ finished! attempt $attempt ------------------" - - uses: codecov/codecov-action@v5 - with: - files: ./coverage.txt - flags: e2e-test-runtime-${{ matrix.runtime }} diff --git a/.github/workflows/test-e2e.yaml b/.github/workflows/test-e2e.yaml index f1a2d7ca..72b12c1d 100644 --- a/.github/workflows/test-e2e.yaml +++ b/.github/workflows/test-e2e.yaml @@ -44,4 +44,4 @@ jobs: - uses: codecov/codecov-action@v5 with: files: ./coverage.txt - flags: e2e-test + flags: e2e-tests diff --git a/.github/workflows/test-unit.yaml b/.github/workflows/test-unit.yaml index 1d634fce..d2e7784b 100644 --- a/.github/workflows/test-unit.yaml +++ b/.github/workflows/test-unit.yaml @@ -44,24 +44,7 @@ jobs: - name: Template Unit Tests if: matrix.os != 'ubuntu-latest' run: make test-templates - - name: "Archive code coverage results" - uses: actions/upload-artifact@v4 - with: - name: coverage-${{ matrix.os }} - path: ./coverage.txt - retention-days: 1 - upload-coverage: - needs: [test] - name: "Upload coverage" - runs-on: "ubuntu-latest" - steps: - - uses: actions/checkout@v4 - - name: Download Coverage - run: | - gh run download -R ${{ github.repository }} ${{ github.run_id }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: codecov/codecov-action@v5 with: - files: ./coverage-ubuntu-latest/coverage.txt,./coverage-windows-latest/coverage.txt,./coverage-macos-latest/coverage.txt + files: ./coverage.txt flags: unit-tests diff --git a/pkg/docker/appease_coverage_gods_test.go b/pkg/docker/appease_coverage_gods_test.go deleted file mode 100644 index 5b2e9766..00000000 --- a/pkg/docker/appease_coverage_gods_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package docker - -import ( - "reflect" - "testing" - - "github.com/docker/docker/client" -) - -// We were not able to make codecov ignore zz_close_guarding_client_generated.go -// This is a workaround. -func TestAppeaseCoverageGods(t *testing.T) { - impl := &closeGuardingClient{} - var cli client.CommonAPIClient = impl - val := reflect.ValueOf(cli) - closeMeth := val.MethodByName("Close") - runAllMethods := func() { - for methIdx := 0; methIdx < val.NumMethod(); methIdx++ { - func() { - defer func() { - // catch the nil dereference since pimpl == nil - _ = recover() - }() - meth := val.Method(methIdx) - if meth == closeMeth { - // we don't want to test the Close() method - return - } - args := make([]reflect.Value, meth.Type().NumIn()) - for argIdx := 0; argIdx < len(args); argIdx++ { - args[argIdx] = reflect.New(meth.Type().In(argIdx)).Elem() - } - meth.Call(args) - }() - } - } - runAllMethods() - impl.closed = true - runAllMethods() -}