From 1d7602775f802c08e35480730fdd074494dc3a12 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Oct 2025 04:55:54 +0000 Subject: [PATCH 1/8] Initial plan From 1c636fdb757792629b7bde24a43c3e4728714d58 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Oct 2025 05:00:05 +0000 Subject: [PATCH 2/8] Move workflow details to local repo and add disk space cleanup - Inline workflow content from kerthcet/github-workflow-as-kube v0.1.21 - Add jlumbroso/free-disk-space action to e2e-test job for disk cleanup - Add concurrency control to cancel in-progress runs - Update checkout actions to v4 consistently Co-authored-by: pacoxu <2010320+pacoxu@users.noreply.github.com> --- .github/workflows/golang-workflow.yaml | 74 +++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/.github/workflows/golang-workflow.yaml b/.github/workflows/golang-workflow.yaml index c4c6efd0..c749706d 100644 --- a/.github/workflows/golang-workflow.yaml +++ b/.github/workflows/golang-workflow.yaml @@ -6,6 +6,76 @@ on: - opened - synchronize +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + GO_VERSION: "1.24.1" + # Do not add the 'v' prefix to the golangci-lint version. + GOLANGCI_VERSION: "2.2.1" + CGO_ENABLED: "0" + jobs: - golang-ci: - uses: kerthcet/github-workflow-as-kube/.github/workflows/workflow-golang-ci.yaml@v0.1.10 + golang-lint: + name: golang-lint + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + - uses: actions/checkout@v4 + - name: golangci-lint + uses: golangci/golangci-lint-action@v7 + with: + version: v${{ env.GOLANGCI_VERSION }} + args: --timeout=30m --config=.golangci.yaml + + unit-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run unit tests + run: | + make test + + integration-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run integration tests + run: | + make test-integration + + e2e-test: + runs-on: ubuntu-latest + + steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + + # all of these default to true, but feel free to set to + # "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run e2e tests + run: | + make test-e2e From db96f150b06375e112fec1cd005c7228786564d2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Oct 2025 05:02:22 +0000 Subject: [PATCH 3/8] Fix workflow: Add Go setup to all test jobs and pin free-disk-space version - Add Go setup step to unit-test, integration-test, and e2e-test jobs - Pin free-disk-space action to v1.3.1 instead of using @main - Ensures all jobs have proper Go runtime configured Co-authored-by: pacoxu <2010320+pacoxu@users.noreply.github.com> --- .github/workflows/golang-workflow.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/golang-workflow.yaml b/.github/workflows/golang-workflow.yaml index c749706d..b53f16b9 100644 --- a/.github/workflows/golang-workflow.yaml +++ b/.github/workflows/golang-workflow.yaml @@ -38,6 +38,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + - name: Run unit tests run: | make test @@ -49,6 +54,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + - name: Run integration tests run: | make test-integration @@ -58,7 +68,7 @@ jobs: steps: - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main + uses: jlumbroso/free-disk-space@v1.3.1 with: # this might remove tools that are actually needed, # if set to "true" but frees about 6 GB @@ -76,6 +86,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + - name: Run e2e tests run: | make test-e2e From b22a0546f4769ce80d5e0d2a49c423778bc01e0d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Oct 2025 05:03:56 +0000 Subject: [PATCH 4/8] Fix workflow: Reorder checkout before Go setup and remove trailing whitespace - Move checkout action before setup-go for proper go.mod detection and caching - Remove trailing whitespace in free-disk-space configuration Co-authored-by: pacoxu <2010320+pacoxu@users.noreply.github.com> --- .github/workflows/golang-workflow.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/golang-workflow.yaml b/.github/workflows/golang-workflow.yaml index b53f16b9..5010152c 100644 --- a/.github/workflows/golang-workflow.yaml +++ b/.github/workflows/golang-workflow.yaml @@ -21,10 +21,10 @@ jobs: name: golang-lint runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - - uses: actions/checkout@v4 - name: golangci-lint uses: golangci/golangci-lint-action@v7 with: @@ -73,7 +73,7 @@ jobs: # this might remove tools that are actually needed, # if set to "true" but frees about 6 GB tool-cache: false - + # all of these default to true, but feel free to set to # "false" if necessary for your workflow android: true From 6e5001b07499c6a2fb9749d6b5f35f6151aaca4c Mon Sep 17 00:00:00 2001 From: Paco Xu Date: Fri, 31 Oct 2025 13:05:03 +0800 Subject: [PATCH 5/8] Add timeout and environment variable for e2e tests --- .github/workflows/golang-workflow.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/golang-workflow.yaml b/.github/workflows/golang-workflow.yaml index 5010152c..cd9252ea 100644 --- a/.github/workflows/golang-workflow.yaml +++ b/.github/workflows/golang-workflow.yaml @@ -94,3 +94,6 @@ jobs: - name: Run e2e tests run: | make test-e2e + timeout-minutes: 20 + env: + GINKGO_TIMEOUT: "15m" From 526b4a0bc4eab86932104a821ab8c09b3121c71f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Oct 2025 05:05:36 +0000 Subject: [PATCH 6/8] Add explicit permissions to workflow for security - Add contents: read permission to restrict GITHUB_TOKEN scope - Follows security best practices for GitHub Actions workflows Co-authored-by: pacoxu <2010320+pacoxu@users.noreply.github.com> --- .github/workflows/golang-workflow.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/golang-workflow.yaml b/.github/workflows/golang-workflow.yaml index cd9252ea..83d6eb87 100644 --- a/.github/workflows/golang-workflow.yaml +++ b/.github/workflows/golang-workflow.yaml @@ -10,6 +10,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + env: GO_VERSION: "1.24.1" # Do not add the 'v' prefix to the golangci-lint version. From 83e6e77ceaec6dae2c7d8bfd791ee06f775211c5 Mon Sep 17 00:00:00 2001 From: Paco Xu Date: Fri, 31 Oct 2025 13:30:01 +0800 Subject: [PATCH 7/8] Update golangci-lint configuration version --- .golangci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.golangci.yaml b/.golangci.yaml index 2c5d7267..beccdcd7 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,3 +1,4 @@ +version: 1 run: timeout: 5m allow-parallel-runners: true From 5e04cc9b81127a0944afab48145d16a58a0222d8 Mon Sep 17 00:00:00 2001 From: Paco Xu Date: Fri, 31 Oct 2025 13:36:32 +0800 Subject: [PATCH 8/8] Update .golangci.yaml --- .golangci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.golangci.yaml b/.golangci.yaml index beccdcd7..2c5d7267 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,4 +1,3 @@ -version: 1 run: timeout: 5m allow-parallel-runners: true