Skip to content

[WIP] test: Run tmt test in github runner #1376

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
57 changes: 57 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: e2e test

on:
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
e2e-test:
name: Run e2e test in Github Runner
runs-on: ubuntu-latest

steps:
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
sudo apt-get update
sudo apt-get install -y qemu-kvm libvirt-clients libvirt-daemon-system libvirt-daemon virtinst bridge-utils qemu-system-x86 network-manager
sudo usermod -a -G kvm,libvirt $USER
sudo adduser `id -un` libvirt

- name: reload the terminal to load the libvirt group
run: |
sudo -E bash -c 'exec su -l '$USER

- name: Check kvm
run: |
sudo apt-get install cpu-checker
egrep -c '(vmx|svm)' /proc/cpuinfo
kvm-ok

- name: Check if user is part of libvirt group
run: |
groups
sudo usermod -a -G libvirt $USER
groups

- name: Check libvirtd status
run: |
sudo systemctl status libvirtd

- name: Install TMT
run: |
pip install --user "tmt[provision]"
tmt --version

- name: Checkout workflow test code
run: |
git clone https://gitlab.com/fedora/bootc/tests/bootc-workflow-test.git

- name: Run test
run: |
sudo setenforce 0
tmt run -vvvv provision --how virtual --image fedora-42 plans --name "/tmt/plans/baseline/bootc-install$"
working-directory: ./bootc-workflow-test
Loading