Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add github action for microshift-e2e #4063

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/test-microshift-bundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Run microshift integration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of this file is a copy of https://github.com/crc-org/crc/blob/main/.github/workflows/test-okd-bundle.yml , wondering if something like https://github.blog/2022-02-10-using-reusable-workflows-github-actions/ can be used to reduce the duplication.


on:
workflow_run:
workflows: [Build RPM]
types:
- completed

jobs:
build:
name: Run microshift e2e integration
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go:
- '1.20'
env:
SHELL: /bin/bash
KUBECONFIG: '/Users/runner/.kube/config'
steps:
- name: Download binary of crc
id: download-binary-crc-artifact
uses: actions/download-artifact@v4
with:
name: linux binary and rpm
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}

- name: Install required virtualization software
run: |
sudo apt-get update
sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system
sudo usermod -a -G libvirt $USER
- name: Remove unwanted stuff to free up disk image
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf /opt/hostedtoolcache/CodeQL

sudo docker image prune --all --force

sudo swapoff -a
sudo rm -f /mnt/swapfile
- name: Write pull-secret
env:
PULL_SECRET: ${{ secrets.PULL_SECRET }}
run: |
echo $PULL_SECRET > ${HOME}/pull-secret

- name: Start the microshift cluster
run: |
set +e
crc config preset microshift
crc setup
crc start -p ${HOME}/pull-secret

- name: Start the microshift e2e test
run: |
set +e
sudo -su $USER ${HOME}/e2e.test --pull-secret-file="${HOME}"/pull-secret \
--bundle-location="" \
--crc-binary=${HOME} \
--godog.tags="linux && @microshift" \
--godog.paths test/e2e/features/

Loading