Skip to content

Commit

Permalink
attempt at matrix testing pre-existing k3d clusters
Browse files Browse the repository at this point in the history
Signed-off-by: catsby <[email protected]>
  • Loading branch information
catsby committed Sep 26, 2024
1 parent b47c53f commit cca039f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
11 changes: 9 additions & 2 deletions .github/actions/k3d/action.yaml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 12 additions & 4 deletions .github/workflows/nightly-uds-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit cca039f

Please sign in to comment.