Skip to content

main: Test Deployment #112

main: Test Deployment

main: Test Deployment #112

name: Test Deployment
run-name: "${{ github.ref_name }}: Test Deployment"
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
schedule:
# Run every Saturday at midnight.
- cron: '0 0 * * 6'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Test cluster deployment.
test-cluster:
if: github.event_name == 'push' || github.event_name == 'pull_request'
name: Cluster
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
manager:
- kubespray
- k3s
k8s:
- v1.29.7
- v1.30.4
distro:
- ubuntu22
networkPlugin:
- calico # K3s will use flannel
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/runner-setup
- name: Deploy cluster
run: |
./scripts/deploy-cluster.sh k8s \
${{ matrix.distro }} \
${{ matrix.networkPlugin }} \
${{ matrix.k8s }} \
${{ matrix.manager }}
- name: Test
run: |
./scripts/test-cluster.sh
# Test multiple k8s versions using the default distro and network plugin.
test-single-node-quick:
if: github.event_name == 'push' || github.event_name == 'pull_request'
name: Node
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
manager:
- k3s
- kubespray
k8sVersion:
- v1.29.7
- v1.30.4
distro:
- ubuntu22
networkPlugin:
- calico # K3s will use flannel
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/runner-setup
- name: Deploy cluster
run: |
./scripts/deploy-node.sh k8s \
${{ matrix.distro }} \
${{ matrix.networkPlugin }} \
${{ matrix.k8sVersion }} \
${{ matrix.manager }}
- name: Test
run: |
./scripts/test-cluster.sh
- name: Destroy cluster
run: |
./scripts/destroy-cluster.sh k8s
# Test most combinations of managers, versions, distros,
# and network plugins. Run this only on schedule.
test-single-node-all:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
name: Node Matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
manager:
- k3s
- kubespray
k8sVersion:
- v1.28.12
- v1.29.7
- v1.30.4
distro:
- ubuntu22
- debian12
- centos9
- rocky9
networkPlugin:
- calico
- cilium
- flannel
- kube-router
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/runner-setup
- name: Deploy single node
run: |
./scripts/deploy-node.sh k8s \
${{ matrix.distro }} \
${{ matrix.networkPlugin }} \
${{ matrix.k8sVersion }} \
${{ matrix.manager }}
- name: Test
run: |
./scripts/test-cluster.sh