diff --git a/.github/workflows/microshift-exp.yaml b/.github/workflows/microshift-exp.yaml new file mode 100644 index 0000000000..bb512c9fb5 --- /dev/null +++ b/.github/workflows/microshift-exp.yaml @@ -0,0 +1,20 @@ +name: MicroShiftexp + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + microshift-runner-exp: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Run a microshift cluster + run: | + sudo apt-get install -y microshift + + microshift version \ No newline at end of file diff --git a/.github/workflows/microshift.yaml b/.github/workflows/microshift.yaml new file mode 100644 index 0000000000..db564760f8 --- /dev/null +++ b/.github/workflows/microshift.yaml @@ -0,0 +1,53 @@ +name: MicroShift + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + microshift-runner: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.x + + - name: Set up podman + run: | + sudo apt-get update + sudo apt-get -y install podman + + - name: Set up oc client + run: | + wget https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz + sudo tar xzvf oc.tar.gz -C /usr/local/bin + + - name: Run a microshift cluster + run: | + sudo podman run -d --rm --name microshift \ + --privileged -v microshift-data:/var/lib -p 6443:6443 \ + quay.io/microshift/microshift-aio:latest + # get kubeconfig + sudo podman exec microshift bash -c \ + 'while ! test -f "/var/lib/microshift/resources/kubeadmin/kubeconfig"; + do + echo "Waiting for kubeconfig..." + sleep 5 + done' + mkdir ${HOME}/.kube + sudo podman cp \ + microshift:/var/lib/microshift/resources/kubeadmin/kubeconfig \ + ${HOME}/.kube/config + sudo chown ${USER} ${HOME}/.kube/config + chmod 600 ${HOME}/.kube/config + # wait for the cluster to become available + sleep 10 + kubectl wait --for=condition=available apiservice --all --timeout 300s + kubectl api-resources + + - run: make check-envtest-existing \ No newline at end of file