github: Use self-hosted runner #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
- push | |
- pull_request | |
permissions: | |
contents: read | |
jobs: | |
end-to-end: | |
name: End to end testing | |
strategy: | |
fail-fast: false | |
runs-on: | |
- self-hosted | |
- cpu-4 | |
- mem-4G | |
- disk-50G | |
- arch-amd64 | |
- image-debian-12 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install --yes \ | |
debian-archive-keyring \ | |
make \ | |
pipx \ | |
qemu-utils | |
- name: Setup Incus | |
run: | | |
curl https://pkgs.zabbly.com/get/incus-daily | sudo sh | |
sudo chmod 666 /var/lib/incus/unix.socket | |
incus admin init --auto | |
- name: Setup mkosi | |
run: | | |
pipx install git+https://github.com/systemd/mkosi.git | |
- name: Build initial image | |
run: | | |
export PATH=${PATH}:/root/.local/bin | |
make | |
- name: Start Incus OS | |
run: | | |
qemu-img convert -f raw -O qcow2 $(ls mkosi.output/IncusOS_*.raw | grep -v usr | grep -v esp | sort | tail -1) os-image.qcow2 | |
incus image import --alias incus-os test/metadata.tar.xz os-image.qcow2 | |
incus init --vm incus-os test-incus-os \ | |
-c security.secureboot=false \ | |
-c limits.cpu=2 \ | |
-c limits.memory=2GiB \ | |
-d root,size=50GiB | |
incus config device add test-incus-os vtpm tpm | |
incus start test-incus-os | |
while :; do | |
sleep 3 | |
incus exec test-incus-os -- /usr/bin/true && break | |
done | |
incus list |