Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: matrix testing pre-existing k3d clusters #944

Merged
merged 13 commits into from
Sep 27, 2024
2 changes: 1 addition & 1 deletion .github/actions/golang/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ runs:
steps:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.21.x
go-version-file: 'go.mod'
13 changes: 11 additions & 2 deletions .github/actions/k3d/action.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
name: setup-k3d
description: "Install k3d and create a cluster"

inputs:
create-cluster:
description: "Boolean specifying if k3d should create a cluster after installation"
required: false
default: 'true'

runs:
using: composite
steps:
- run: "curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash"
- name: install k3d
run: "curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash"
shell: bash

- run: k3d cluster delete && k3d cluster create
- name: create cluster
if: ${{ inputs.create-cluster == 'true' }}
run: k3d cluster delete && k3d cluster create
shell: bash
6 changes: 0 additions & 6 deletions .github/actions/setup-from-previous/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ description: grabs artifact from a previous job and sets up the env for tests
runs:
using: composite
steps:
# Checkout the repo and setup the tooling for this job
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0

catsby marked this conversation as resolved.
Show resolved Hide resolved
- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/nightly-uds-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ concurrency:
jobs:
uds-core-test:
runs-on: ubuntu-latest
strategy:
matrix:
type: [with-cluster, without-cluster]
permissions:
contents: read
steps:
Expand All @@ -37,9 +40,10 @@ jobs:
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.type == 'with-cluster' && 'true' || 'false'}}"

- name: Run UDS Core smoke test
run: build/uds run test:ci-uds-core-smoke-test
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Tests
name: E2E Release Tests
on:
workflow_call: # This is the event that triggers the workflow

Expand Down Expand Up @@ -47,6 +47,9 @@ jobs:
smoke-test:
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
type: [with-cluster, without-cluster]
steps:
# Checkout the repo and setup the tooling for this job
- name: Checkout
Expand All @@ -69,6 +72,8 @@ jobs:

- name: Setup K3d
uses: ./.github/actions/k3d
with:
create-cluster: "${{ matrix.type == 'with-cluster' && 'true' || 'false'}}"

- name: Login to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Tests
name: E2E PR Tests
on:
catsby marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
paths-ignore:
Expand Down
Loading