-
Notifications
You must be signed in to change notification settings - Fork 242
55 lines (53 loc) · 1.52 KB
/
test-okd-bundle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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.21'
env:
SHELL: /bin/bash
KUBECONFIG: '/Users/runner/.kube/config'
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Set up Go
uses: actions/setup-go@v5
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