From dd7cf21a8bbd8f8218eb4f2f1fa72e0ed9f7cc27 Mon Sep 17 00:00:00 2001 From: onuryilmaz Date: Wed, 24 Jun 2026 17:21:04 +0200 Subject: [PATCH 1/2] feat(ci): delegate unit tests to shared-go-test workflow Replace inline unit test steps with a call to cloudoperators/common shared-go-test.yaml. The e2e job retains its inline steps because it uses a cloudctl-specific k3d setup that does not map to the greenhouse KinD composite action. Part of cloudoperators/common#2086 Signed-off-by: onuryilmaz --- .github/workflows/test.yaml | 38 ++++++++----------------------------- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5c07a24..bfdb6d8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,26 +8,9 @@ on: jobs: unit: name: Unit tests - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - - - name: Set up Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6 - with: - go-version: '1.25' - - - name: Show Go env - run: | - go version - go env - - - name: Tidy modules - run: make tidy - - - name: Run unit tests - run: make test + uses: cloudoperators/common/.github/workflows/shared-go-test.yaml@main + with: + test-target: test e2e: name: E2E tests (k3d) @@ -35,17 +18,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: Set up Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6 + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 with: - go-version: '1.25' + go-version-file: go.mod + cache: true - name: Install kubectl uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4 with: - version: 'v1.29.0' # any modern kubectl compatible with k3d's default + version: 'v1.29.0' - name: Install k3d run: | @@ -57,11 +41,5 @@ jobs: - name: Run E2E tests env: - # Optional: customize e2e settings via Makefile variables if needed - # E2E_CLUSTER_NAME: cloudctl-e2e - # E2E_TAGS: e2e - # E2E_KUBECONFIG: ${{ github.workspace }}/e2e/e2e-kubeconfig - # E2E_BIN: ${{ github.workspace }}/bin/cloudctl - # Increase verbosity by adding GOFLAGS=-v or similar if desired GOFLAGS: "" run: make e2e From d09819044569fc128ead4d7945217045441738eb Mon Sep 17 00:00:00 2001 From: onuryilmaz Date: Wed, 24 Jun 2026 17:59:32 +0200 Subject: [PATCH 2/2] fix(ci): add permissions: contents: read to e2e job Signed-off-by: onuryilmaz --- .github/workflows/test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bfdb6d8..a4c2210 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,6 +16,8 @@ jobs: name: E2E tests (k3d) needs: unit runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4