From 4db7687833ce7ff41afd91f8edd012e712fc01ff Mon Sep 17 00:00:00 2001 From: Din Music Date: Sat, 6 Apr 2024 18:54:49 +0200 Subject: [PATCH] github/workflows: Add integration test workflow Signed-off-by: Din Music --- .github/workflows/tests-deploy-cluster.yml | 46 +++++++++++++++++++ .github/workflows/tests-deploy-node.yml | 52 ++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 .github/workflows/tests-deploy-cluster.yml create mode 100644 .github/workflows/tests-deploy-node.yml diff --git a/.github/workflows/tests-deploy-cluster.yml b/.github/workflows/tests-deploy-cluster.yml new file mode 100644 index 00000000..3e0e5e51 --- /dev/null +++ b/.github/workflows/tests-deploy-cluster.yml @@ -0,0 +1,46 @@ +name: Test Deployment (Cluster) +run-name: "${{ github.ref_name }}: Test Deployment (Cluster)" + +on: + pull_request: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test-cluster: + name: Cluster + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + k8sVersion: + - v1.26.13 + - v1.27.10 + - v1.28.6 + distro: + - ubuntu22 + networkPlugin: + - calico + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup environment + uses: ./.github/actions/runner-setup + + - name: Deploy cluster + run: | + ./tests/deploy-cluster.sh k8s \ + ${{ matrix.distro }} \ + ${{ matrix.networkPlugin }} \ + ${{ matrix.k8sVersion }} + + - name: Test + run: | + ./tests/test-cluster.sh diff --git a/.github/workflows/tests-deploy-node.yml b/.github/workflows/tests-deploy-node.yml new file mode 100644 index 00000000..13b9e2c7 --- /dev/null +++ b/.github/workflows/tests-deploy-node.yml @@ -0,0 +1,52 @@ +name: Test Deployment (Single Node) +run-name: "${{ github.ref_name }}: Test Deployment (Single Node)" + +on: + pull_request: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test-single-node: + name: Node + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + k8sVersion: + - v1.26.13 + - v1.27.10 + - v1.28.6 + 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 }} + + - name: Test + run: | + ./scripts/test-cluster.sh