From 99fd67581fb51b53dc9ea1c139a4490af6779c33 Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Mon, 10 Apr 2023 11:20:36 -0400 Subject: [PATCH] run unit tests and integration tests in parallel --- .github/workflows/build-test.yaml | 12 +++++++++++- .github/workflows/release.yaml | 29 +++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 63eefbe..4bf2de1 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -8,7 +8,7 @@ on: jobs: - build: + unit-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -21,6 +21,16 @@ jobs: - name: Test run: make test + integration-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.19 + - name: Build run: make build diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ce3cb62..407b551 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,7 +7,7 @@ on: jobs: - test: + unit-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -20,11 +20,36 @@ jobs: - name: Test run: make test + integration-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.19 + + - name: Build + run: make build + + - name: Create k8s Kind Cluster + uses: helm/kind-action@v1.4.0 + + - name: Create Testdata in Cluster + run: ./testing/init.sh + + - name: Run PVMigrate + run: ./bin/pvmigrate --source-sc int-source --dest-sc int-dest + + - name: Validate Cluster End State + run: ./testing/validate.sh goreleaser: runs-on: ubuntu-latest needs: - - test + - unit-test + - integration-test if: startsWith(github.ref, 'refs/tags/v') steps: - name: Checkout