ci: Add tests for bootloaders

Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
This commit is contained in:
Vasiliy Stelmachenok authored and Peter Jung committed 2026-04-20 19:12:34 +02:00
1 parent b4c1b8d14c
commit 41c699bdd6
2 files changed
+42 -2

No files matched your search

+8 -2
View File
@@ -45,12 +45,17 @@ jobs:
name: cachyos-desktop-linux-${{ steps.date.outputs.builddate }} name: cachyos-desktop-linux-${{ steps.date.outputs.builddate }}
path: out/desktop/* path: out/desktop/*
quicktest: quicktest:
name: Testing name: Testing (${{ matrix.bootloader }})
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
container: container:
image: archlinux:base-devel image: archlinux:base-devel
options: --privileged options: --privileged
strategy:
fail-fast: false
max-parallel: 4
matrix:
bootloader: [grub, systemd-boot, refind, limine]
steps: steps:
- name: Clone CachyOS-Live-ISO - name: Clone CachyOS-Live-ISO
id: clone id: clone
@@ -102,11 +107,12 @@ jobs:
QT_TESTCASES_DIR: "./testcases" QT_TESTCASES_DIR: "./testcases"
QUICKEMU_DISPLAY: "none" QUICKEMU_DISPLAY: "none"
QUICKEMU_VM_DIR: "./machines" QUICKEMU_VM_DIR: "./machines"
TEST_BOOTLOADER: "${{ matrix.bootloader }}"
- name: Upload results to artifacts - name: Upload results to artifacts
id: upload-results id: upload-results
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: cachyos-desktop-linux-results-${{needs.build.outputs.builddate}} name: cachyos-desktop-linux-results-${{needs.build.outputs.builddate}}-${{ matrix.bootloader }}
path: results/* path: results/*
@@ -62,8 +62,19 @@ function test_calamares_keyboard() {
function test_calamares_bootloader() { function test_calamares_bootloader() {
qt_wait_for_text "$FUNCNAME" "$text_calamares_bootloader" 10 5 qt_wait_for_text "$FUNCNAME" "$text_calamares_bootloader" 10 5
qt_send_key_combo "shift-tab"
qt_send_key_combo "shift-tab"
qt_send_key_combo "shift-tab"
qt_send_key_combo "spc" qt_send_key_combo "spc"
for ((i=0; i < bootloader_index; i++)); do
qt_send_key_combo "down"
done
qt_send_key_combo "shift-tab"
qt_send_key_combo "shift-tab"
qt_screenshot_ppm "$FUNCNAME" qt_screenshot_ppm "$FUNCNAME"
qt_send_key_combo "spc"
} }
function test_calamares_partitions() { function test_calamares_partitions() {
@@ -133,7 +144,30 @@ function test_power_off_vm() {
qt_poweroff_vm qt_poweroff_vm
} }
function test_input_validation() {
local -Ar bootloaders=(
["grub"]="0"
["refind"]="1"
["refind-ai"]="2"
["systemd-boot"]="3"
["limine"]="4"
)
local bootloader="${TEST_BOOTLOADER:-Limine}"
local -g bootloader_index="${bootloaders[$bootloader]}"
if [ -z "$bootloader_index" ]; then
qt_echo "🚨 Unknown bootloader passed: $bootloader"
exit 1
else
qt_echo "✅ Selected bootloader is $bootloader ($bootloader_index)"
fi
qt_echo "✅ Validation passed"
}
function test_install_calamares() { function test_install_calamares() {
test_input_validation
test_setup test_setup
test_post_boot_grub test_post_boot_grub
test_launch_calamares test_launch_calamares