Skip to content

Commit 122d614

Browse files
committed
add: actions
1 parent 2e6c330 commit 122d614

File tree

2 files changed

+149
-0
lines changed

2 files changed

+149
-0
lines changed

.github/workflows/distro-tests.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Daily Distro Tests
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 3 * * *'
7+
8+
concurrency:
9+
group: distro-tests
10+
cancel-in-progress: false
11+
12+
jobs:
13+
distro-tests:
14+
runs-on: [self-hosted, linux, kvm]
15+
timeout-minutes: 180
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
distro:
20+
- ubuntu-2404
21+
- ubuntu-2204
22+
- ubuntu-2004
23+
- debian-12
24+
- debian-11
25+
- centos-stream-9
26+
- fedora-41
27+
- opensuse-leap-155
28+
- rocky-linux-9
29+
- rocky-linux-8
30+
- almalinux-9
31+
- almalinux-8
32+
- archlinux
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
37+
- name: Run setup-k8s test
38+
working-directory: test
39+
env:
40+
BASH_DEBUG: '0'
41+
run: |
42+
set -euo pipefail
43+
./run-test.sh ${{ matrix.distro }}
44+
45+
- name: Upload logs
46+
if: always()
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: logs-${{ matrix.distro }}
50+
path: |
51+
test/results/logs
52+
test/results/test-result.json
53+
if-no-files-found: ignore

.github/workflows/ubuntu-tests.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Ubuntu Option Tests
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '30 3 * * *'
7+
8+
jobs:
9+
ubuntu-option-tests:
10+
runs-on: [self-hosted, linux, kvm]
11+
timeout-minutes: 240
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- name: ubuntu2404-online-latest
17+
distro: ubuntu-2404
18+
mode: online
19+
k8s_version: ""
20+
setup_args: ""
21+
- name: ubuntu2404-offline-default
22+
distro: ubuntu-2404
23+
mode: offline
24+
k8s_version: ""
25+
setup_args: ""
26+
- name: ubuntu2404-ipvs-crio
27+
distro: ubuntu-2404
28+
mode: offline
29+
k8s_version: ""
30+
setup_args: "--proxy-mode ipvs --cri crio"
31+
- name: ubuntu2404-nftables-k130
32+
distro: ubuntu-2404
33+
mode: offline
34+
k8s_version: "1.30"
35+
setup_args: "--proxy-mode nftables"
36+
- name: ubuntu2404-helm-completion
37+
distro: ubuntu-2404
38+
mode: offline
39+
k8s_version: ""
40+
setup_args: "--install-helm true --completion-shells bash"
41+
- name: ubuntu2204-custom-k8s
42+
distro: ubuntu-2204
43+
mode: offline
44+
k8s_version: "1.31"
45+
setup_args: "--install-helm false"
46+
- name: ubuntu2204-cri-containerd-ipvs
47+
distro: ubuntu-2204
48+
mode: offline
49+
k8s_version: ""
50+
setup_args: "--proxy-mode ipvs --cri containerd"
51+
- name: ubuntu2004-legacy-k128
52+
distro: ubuntu-2004
53+
mode: offline
54+
k8s_version: "1.28"
55+
setup_args: ""
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@v4
59+
60+
- name: Run setup-k8s option test
61+
working-directory: test
62+
env:
63+
MODE: ${{ matrix.mode }}
64+
SETUP_ARGS: ${{ matrix.setup_args }}
65+
K8S_VERSION: ${{ matrix.k8s_version }}
66+
DISTRO: ${{ matrix.distro }}
67+
run: |
68+
set -euo pipefail
69+
mode_flag=""
70+
if [ "$MODE" = "online" ]; then
71+
mode_flag="--online"
72+
else
73+
mode_flag="--offline"
74+
fi
75+
76+
k8s_flag=""
77+
if [ -n "$K8S_VERSION" ]; then
78+
k8s_flag="--k8s-version $K8S_VERSION"
79+
fi
80+
81+
setup_flag=()
82+
if [ -n "$SETUP_ARGS" ]; then
83+
setup_flag=(--setup-args "$SETUP_ARGS")
84+
fi
85+
86+
./run-test.sh $mode_flag $k8s_flag "${setup_flag[@]}" "$DISTRO"
87+
88+
- name: Upload logs
89+
if: always()
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: logs-${{ matrix.name }}
93+
path: |
94+
test/results/logs
95+
test/results/test-result.json
96+
if-no-files-found: ignore

0 commit comments

Comments
 (0)