diff --git a/.github/actions/golang/action.yaml b/.github/actions/golang/action.yaml index 60cf98e3..0b076e78 100644 --- a/.github/actions/golang/action.yaml +++ b/.github/actions/golang/action.yaml @@ -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' diff --git a/.github/actions/k3d/action.yaml b/.github/actions/k3d/action.yaml index b5496adc..fcfe5580 100644 --- a/.github/actions/k3d/action.yaml +++ b/.github/actions/k3d/action.yaml @@ -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 diff --git a/.github/actions/setup-from-previous/action.yaml b/.github/actions/setup-from-previous/action.yaml index f272f7da..4300dd5e 100644 --- a/.github/actions/setup-from-previous/action.yaml +++ b/.github/actions/setup-from-previous/action.yaml @@ -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 - - name: Download build artifacts uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: diff --git a/.github/workflows/nightly-uds-core.yaml b/.github/workflows/nightly-uds-core.yaml index a3071918..fed97b78 100644 --- a/.github/workflows/nightly-uds-core.yaml +++ b/.github/workflows/nightly-uds-core.yaml @@ -16,6 +16,9 @@ concurrency: jobs: uds-core-test: runs-on: ubuntu-latest + strategy: + matrix: + type: [with-cluster, without-cluster] permissions: contents: read steps: @@ -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 diff --git a/.github/workflows/release-tests.yaml b/.github/workflows/release-tests.yaml index b12eb5cd..afdc91f2 100644 --- a/.github/workflows/release-tests.yaml +++ b/.github/workflows/release-tests.yaml @@ -1,4 +1,4 @@ -name: E2E Tests +name: E2E Release Tests on: workflow_call: # This is the event that triggers the workflow @@ -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 @@ -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 diff --git a/.github/workflows/test-e2e-pr.yaml b/.github/workflows/test-e2e-pr.yaml index ae3aba87..075dfee5 100644 --- a/.github/workflows/test-e2e-pr.yaml +++ b/.github/workflows/test-e2e-pr.yaml @@ -1,4 +1,4 @@ -name: E2E Tests +name: E2E PR Tests on: pull_request: paths-ignore: