-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add github action to test OKD bundle
- Loading branch information
1 parent
2b447fc
commit 1b5e7c2
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Test OKD bundle | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: {} | ||
jobs: | ||
build: | ||
name: Run OKD bundle with crc | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
go: | ||
- '1.20' | ||
env: | ||
SHELL: /bin/bash | ||
KUBECONFIG: '/Users/runner/.kube/config' | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.sha }} | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Build | ||
run: | | ||
make cross | ||
sudo cp out/linux-amd64/crc /usr/local/bin/crc | ||
- 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: Set the crc config | ||
run: | | ||
crc config set preset okd | ||
crc config set network-mode user | ||
- name: Setup the crc | ||
run: sudo -su $USER crc setup | ||
- name: Start the crc | ||
run: sudo -su $USER crc start |