Skip to content

Commit

Permalink
CI: shrink test matrix
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Dec 10, 2024
1 parent e527663 commit 3dda3c0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 36 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,42 @@ env:
DOCKER_BUILDKIT: 1
KUBECONFIG: ./kubeconfig
jobs:
# This uses the reusable-single-node.yaml template
single-node:
name: "Single node with defaults"
uses: ./.github/workflows/reusable-single-node.yaml

single-node-custom-ports:
name: "Single node with custom service ports"
name: "Single node"
strategy:
fail-fast: false
matrix:
container_engine: [docker, nerdctl, podman]
uses: ./.github/workflows/reusable-single-node.yaml
with:
# Defaults to 6443
kube_apiserver_port: "8080"
# Defaults to 8472
flannel_port: "9072"
# Defaults to 10250
kubelet_port: "20250"
# Defaults to 2379
etcd_port: "9090"
container_engine: ${{ matrix.container_engine }}

# This uses the reusable-multi-node.yaml template
multi-node:
name: "Multi node with defaults"
name: "Multi node"
strategy:
fail-fast: false
matrix:
include:
- lima_template: template://ubuntu-24.04
container_engine: docker
- lima_template: template://ubuntu-24.04
container_engine: nerdctl
- lima_template: template://centos-stream-9
container_engine: podman
- lima_template: template://fedora
container_engine: podman
uses: ./.github/workflows/reusable-multi-node.yaml
with:
lima_template: ${{ matrix.lima_template }}
container_engine: ${{ matrix.container_engine }}

# TODO: this test should create multiple instances of Usernetes on each of the hosts
multi-node-custom-ports:
name: "Multi node with custom service ports"
uses: ./.github/workflows/reusable-multi-node.yaml
with:
lima_template: "template://ubuntu-24.04"
container_engine: "docker"
# Defaults to 6443
kube_apiserver_port: "8080"
# Defaults to 8472
Expand All @@ -40,4 +49,3 @@ jobs:
kubelet_port: "20250"
# Defaults to 2379
etcd_port: "9090"

24 changes: 10 additions & 14 deletions .github/workflows/reusable-multi-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ on:
workflow_call:
# allow reuse of this workflow in other files here
inputs:
lima_template:
description: lima template
type: string
default: "template://ubuntu-24.04"
container_engine:
description: container engine
type: string
default: "docker"
kubelet_port:
description: kubelet serving port
type: string
Expand Down Expand Up @@ -30,21 +38,9 @@ jobs:
name: "Multi node (emulated using Lima)"
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- lima-template: template://ubuntu-24.04
engine: docker
- lima-template: template://ubuntu-24.04
engine: nerdctl
- lima-template: template://centos-stream-9
engine: podman
- lima-template: template://fedora
engine: podman
env:
LIMA_TEMPLATE: "${{ matrix.lima-template }}"
CONTAINER_ENGINE: "${{ matrix.engine }}"
LIMA_TEMPLATE: "${{ matrix.lima_template }}"
CONTAINER_ENGINE: "${{ matrix.container_engine }}"
U7S_PORT_KUBE_APISERVER: "${{ inputs.kube_apiserver_port }}"
U7S_PORT_FLANNEL: "${{ inputs.flannel_port }}"
U7S_PORT_KUBELET: "${{ inputs.kubelet_port }}"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/reusable-single-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Single Node
on:
workflow_call:
inputs:
container_engine:
description: container engine
type: string
default: "docker"
kubelet_port:
description: kubelet serving port
type: string
Expand Down Expand Up @@ -29,12 +33,8 @@ jobs:
name: "Single node"
runs-on: ubuntu-24.04
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
engine: [docker, nerdctl, podman]
env:
CONTAINER_ENGINE: "${{ matrix.engine }}"
CONTAINER_ENGINE: "${{ inputs.container_engine }}"
U7S_PORT_KUBE_APISERVER: "${{ inputs.kube_apiserver_port }}"
U7S_PORT_FLANNEL: "${{ inputs.flannel_port }}"
U7S_PORT_KUBELET: "${{ inputs.kubelet_port }}"
Expand Down

0 comments on commit 3dda3c0

Please sign in to comment.