diff --git a/.github/actions/k3d/action.yaml b/.github/actions/k3d/action.yaml index b5496adc..1eecd988 100644 --- a/.github/actions/k3d/action.yaml +++ b/.github/actions/k3d/action.yaml @@ -1,11 +1,18 @@ name: setup-k3d description: "Install k3d and create a cluster" +inputs: + create-clutser: + description: "Boolean specifying if k3d should create a cluster after installation" + required: true + default: true + runs: using: composite steps: - run: "curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash" shell: bash - - run: k3d cluster delete && k3d cluster create - shell: bash + - if: ${{ inputs.create-cluster }} + run: k3d cluster delete && k3d cluster create + shell: bash \ No newline at end of file diff --git a/.github/workflows/nightly-uds-core.yaml b/.github/workflows/nightly-uds-core.yaml index a3071918..4d83ec73 100644 --- a/.github/workflows/nightly-uds-core.yaml +++ b/.github/workflows/nightly-uds-core.yaml @@ -16,6 +16,12 @@ concurrency: jobs: uds-core-test: runs-on: ubuntu-latest + strategy: + matrix: + existing-cluster: [with-cluster, without-cluster] + include: + - existing-cluster: without-cluster + create-cluster: false permissions: contents: read steps: @@ -36,10 +42,12 @@ jobs: - name: Make UDS-CLI executable run: | chmod +x build/uds - - - name: Install-k3d - run: "curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash" - shell: bash + + - name: Setup K3d + uses: ./.github/actions/k3d + with: + create-cluster: ${{ matrix.create-cluster }} + - name: Run UDS Core smoke test run: build/uds run test:ci-uds-core-smoke-test diff --git a/.github/workflows/release-tests.yaml b/.github/workflows/release-tests.yaml index b12eb5cd..078df66f 100644 --- a/.github/workflows/release-tests.yaml +++ b/.github/workflows/release-tests.yaml @@ -47,6 +47,12 @@ jobs: smoke-test: runs-on: ubuntu-latest needs: test + strategy: + matrix: + existing-cluster: [with-cluster, without-cluster] + include: + - existing-cluster: without-cluster + create-cluster: false steps: # Checkout the repo and setup the tooling for this job - name: Checkout @@ -69,6 +75,8 @@ jobs: - name: Setup K3d uses: ./.github/actions/k3d + with: + create-cluster: ${{ matrix.create-cluster }} - name: Login to GHCR uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0