Skip to content

Commit 0878635

Browse files
author
eaudetcobello
committed
Add initial implementation for conform. GH action
Currently, the k8s e2e conformance suite has to be run manually, which is a tedious and time-consuming process. The goal of this PR is to enable engineers to run conformance tests at the click of a button and get the output .tar.gz.
1 parent 66176f2 commit 0878635

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/conformance.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: run-conformance-suite
2+
3+
on:
4+
pull_request
5+
# when complete
6+
# workflow_dispatch:
7+
# inputs:
8+
# channel:
9+
# description: 'Channel to use for MicroK8s'
10+
# required: true
11+
# default: '1.30/stable'
12+
13+
14+
jobs:
15+
run-conformance-suite:
16+
name: Run Conformance Suite
17+
runs-on: ubuntu-latest
18+
19+
env:
20+
CHANNEL: 1.30/stable
21+
22+
steps:
23+
- name: Check out code
24+
uses: actions/checkout@v4
25+
26+
- name: Install dependencies
27+
run: |
28+
sudo snap install go --classic
29+
go install github.com/vmware-tanzu/[email protected]
30+
sudo snap install microk8s --classic --channel $CHANNEL
31+
sudo microk8s status --wait-ready
32+
sudo snap install multipass
33+
sudo multipass start
34+
35+
- name: Generate Join Token
36+
id: get_token
37+
run: echo "WORKER_TOKEN=$(microk8s add-node | grep '^microk8s join .* --worker\$' | awk '{print $3}')" >> "$GITHUB_OUTPUT"
38+
39+
- name: Launch VM and Join Cluster
40+
env:
41+
TOKEN: ${{ steps.get_token.outputs.WORKER_TOKEN }}
42+
run: |
43+
sudo multipass launch --name microk8s-worker-vm
44+
sudo multipass exec microk8s-worker-vm -- bash -c "sudo snap install microk8s --classic --channel $CHANNEL; sudo microk8s join $TOKEN"

0 commit comments

Comments
 (0)