From 369087f90f5be848870a8e1d22dc8a77fcb30140 Mon Sep 17 00:00:00 2001 From: Yusuke Kuoka Date: Tue, 28 Jan 2025 18:02:13 +0900 Subject: [PATCH 1/2] chore: Separate job for E2E testing --- .github/workflows/ci.yaml | 28 ++++++++++++++++++++++++++-- {tests => e2e}/e2e_test.go | 0 2 files changed, 26 insertions(+), 2 deletions(-) rename {tests => e2e}/e2e_test.go (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 983ceb2..363e156 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -130,14 +130,38 @@ jobs: with: version: v1.61 + - name: Run go test + run: go test -v ./tests/... + + e2e-test: + name: e2e-test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup helm + uses: azure/setup-helm@v3 + with: + version: v3.6.3 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: stable + - name: Create kind cluster uses: helm/kind-action@v1.8.0 with: node_image: kindest/node:v1.29.2 version: v0.20.0 - - name: Run go test - run: go test -v ./... + - name: Run e2e test + # The timeout is explicitly set to clarify that we intend it to be short enough + # and not uncontrollably getting longer. + run: go test -v ./e2e/... -timeout 5m install-chart: name: install-chart diff --git a/tests/e2e_test.go b/e2e/e2e_test.go similarity index 100% rename from tests/e2e_test.go rename to e2e/e2e_test.go From e800773e3f5d1c0d508ac4e0b44891752882e35b Mon Sep 17 00:00:00 2001 From: Yusuke Kuoka Date: Tue, 28 Jan 2025 18:05:52 +0900 Subject: [PATCH 2/2] Run tests also when tests are modified --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 363e156..e4bd256 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,6 +5,8 @@ on: pull_request: paths: - "charts/**" + - "e2e/**" + - "tests/**" permissions: contents: read