Skip to content

Commit

Permalink
Add initial implementation for conform. GH action
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eaudetcobello committed May 22, 2024
1 parent 66176f2 commit dad64a0
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: run-conformance-suite

on:
pull_request
# when complete
# workflow_dispatch:
# inputs:
# channel:
# description: 'Channel to use for MicroK8s'
# required: true
# default: '1.30/stable'


jobs:
run-conformance-suite:
name: Run Conformance Suite
runs-on: ubuntu-latest

env:
CHANNEL: 1.30/stable

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo snap install go --classic
go install github.com/vmware-tanzu/[email protected]
sudo snap install microk8s --classic --channel $CHANNEL
sudo microk8s status --wait-ready
sudo snap install multipass
- name: Generate Join Token
id: get_token
run: echo "WORKER_TOKEN=$(microk8s add-node | grep '^microk8s join .* --worker\$' | awk '{print $3})'" >> "$GITHUB_OUTPUT"

- name: Launch VM and Join Cluster
run: |
multipass launch --name microk8s-worker-vm
multipass exec microk8s-vm -- bash -c "sudo snap install microk8s --classic --channel $CHANNEL; sudo microk8s join ${{ steps.get_token.outputs.WORKER_TOKEN }}"

0 comments on commit dad64a0

Please sign in to comment.