From 41c699bdd68d96a22f868c74426a66855bc83ec7 Mon Sep 17 00:00:00 2001 From: Vasiliy Stelmachenok Date: Thu, 26 Feb 2026 00:18:29 +0300 Subject: [PATCH] ci: Add tests for bootloaders Signed-off-by: Vasiliy Stelmachenok --- .github/workflows/build.yml | 10 ++++-- .../cachyos/dailylive/test_install_calamares | 34 +++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2b1c14..f56f434 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,12 +45,17 @@ jobs: name: cachyos-desktop-linux-${{ steps.date.outputs.builddate }} path: out/desktop/* quicktest: - name: Testing + name: Testing (${{ matrix.bootloader }}) runs-on: ubuntu-latest needs: build container: image: archlinux:base-devel options: --privileged + strategy: + fail-fast: false + max-parallel: 4 + matrix: + bootloader: [grub, systemd-boot, refind, limine] steps: - name: Clone CachyOS-Live-ISO id: clone @@ -102,11 +107,12 @@ jobs: QT_TESTCASES_DIR: "./testcases" QUICKEMU_DISPLAY: "none" QUICKEMU_VM_DIR: "./machines" + TEST_BOOTLOADER: "${{ matrix.bootloader }}" - name: Upload results to artifacts id: upload-results if: always() uses: actions/upload-artifact@v4 with: - name: cachyos-desktop-linux-results-${{needs.build.outputs.builddate}} + name: cachyos-desktop-linux-results-${{needs.build.outputs.builddate}}-${{ matrix.bootloader }} path: results/* diff --git a/testcases/cachyos/dailylive/test_install_calamares b/testcases/cachyos/dailylive/test_install_calamares index f0361bb..e47b806 100644 --- a/testcases/cachyos/dailylive/test_install_calamares +++ b/testcases/cachyos/dailylive/test_install_calamares @@ -62,8 +62,19 @@ function test_calamares_keyboard() { function test_calamares_bootloader() { 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" + + 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_send_key_combo "spc" } function test_calamares_partitions() { @@ -133,7 +144,30 @@ function test_power_off_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() { + test_input_validation test_setup test_post_boot_grub test_launch_calamares