Skip to content

Commit fbbef5b

Browse files
committed
CI: Add github action for microshift-e2e
1 parent 4026f7f commit fbbef5b

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Run microshift integration
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request: {}
6+
jobs:
7+
build:
8+
name: Run microshift e2e integration
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
go:
14+
- '1.20'
15+
env:
16+
SHELL: /bin/bash
17+
KUBECONFIG: '/Users/runner/.kube/config'
18+
steps:
19+
- name: Check out code into the Go module directory
20+
uses: actions/checkout@v4
21+
with:
22+
ref: ${{ github.sha }}
23+
- name: Set up Go
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version: ${{ matrix.go }}
27+
- name: Build
28+
run: |
29+
make cross
30+
sudo cp out/linux-amd64/crc ${HOME}/crc
31+
make build_e2e
32+
sudo cp out/linux-amd64/e2e.test ${HOME}/e2e.test
33+
cp -r test/testdata ${HOME}/work/crc/testdata
34+
35+
- name: Install required virtualization software
36+
run: |
37+
sudo apt-get update
38+
sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system
39+
sudo usermod -a -G libvirt $USER
40+
- name: Remove unwanted stuff to free up disk image
41+
run: |
42+
sudo rm -rf /usr/share/dotnet
43+
sudo rm -rf /usr/local/lib/android
44+
sudo rm -rf /opt/ghc
45+
sudo rm -rf "/usr/local/share/boost"
46+
sudo rm -rf /opt/hostedtoolcache/CodeQL
47+
48+
sudo docker image prune --all --force
49+
50+
sudo swapoff -a
51+
sudo rm -f /mnt/swapfile
52+
- name: Write pull-secret
53+
env:
54+
PULL_SECRET: ${{ secrets.PULL_SECRET }}
55+
run: |
56+
echo $PULL_SECRET > ${HOME}/pull-secret
57+
58+
- name: Start the microshift e2e test
59+
run: |
60+
set +e
61+
sudo -su $USER ${HOME}/e2e.test --pull-secret-file="${HOME}"/pull-secret \
62+
--bundle-location="" \
63+
--crc-binary=${HOME} \
64+
--godog.tags="linux && @microshift" \
65+
--godog.paths test/e2e/features/
66+

0 commit comments

Comments
 (0)