Skip to content

Commit cc7c96e

Browse files
committed
test: Run tmt test in github runner
Signed-off-by: Xiaofeng Wang <[email protected]>
1 parent c76d9e2 commit cc7c96e

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/e2e.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: e2e test
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
e2e-test:
10+
name: Run e2e test in Github Runner
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Enable KVM group perms
15+
run: |
16+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
17+
sudo udevadm control --reload-rules
18+
sudo udevadm trigger --name-match=kvm
19+
sudo apt-get update
20+
sudo apt-get install -y qemu-kvm libvirt-clients libvirt-daemon-system libvirt-daemon virtinst bridge-utils qemu-system-x86 network-manager
21+
sudo usermod -a -G kvm,libvirt $USER
22+
sudo adduser `id -un` libvirt
23+
24+
- name: reload the terminal to load the libvirt group
25+
run: |
26+
sudo -E bash -c 'exec su -l '$USER
27+
28+
- name: Check kvm
29+
run: |
30+
sudo apt-get install cpu-checker
31+
egrep -c '(vmx|svm)' /proc/cpuinfo
32+
kvm-ok
33+
34+
- name: Check if user is part of libvirt group
35+
run: |
36+
groups
37+
sudo usermod -a -G libvirt $USER
38+
groups
39+
40+
- name: Check libvirtd status
41+
run: |
42+
sudo systemctl status libvirtd
43+
44+
- name: Install TMT
45+
run: |
46+
pip install --user "tmt[provision]"
47+
tmt --version
48+
49+
- name: Checkout workflow test code
50+
run: |
51+
git clone https://gitlab.com/fedora/bootc/tests/bootc-workflow-test.git
52+
53+
- name: Run test
54+
run: |
55+
sudo setenforce 0
56+
tmt run -vvvv provision --how virtual --image fedora-42 plans --name "/tmt/plans/baseline/bootc-install$"
57+
working-directory: ./bootc-workflow-test

0 commit comments

Comments
 (0)