Skip to content

Add CI which spins up Vagrant and checks the box #1

Add CI which spins up Vagrant and checks the box

Add CI which spins up Vagrant and checks the box #1

Workflow file for this run

name: main
on:
push:
branches:
- main
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
steps:
# Set up vagrant etc.
# https://github.com/APN-Pucky/gentoo-prefix-tester/blob/1ecbecb7c14efa92b0899e37f32604eea764bdb7/actions/kvm/action.yml#L34-L54
# https://github.blog/changelog/2024-04-02-github-actions-hardware-accelerated-android-virtualization-now-available/
- name: Enable KVM group perms
shell: bash
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
# https://github.com/jonashackt/vagrant-travisci-libvrt
# https://wiki.debian.org/Vagrant
- name: Install libvirt kvm and Vagrant
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y bridge-utils dnsmasq-base ebtables libvirt-dev qemu-kvm qemu-utils ruby-dev
sudo apt-get install -y libvirt-daemon-system vagrant-libvirt libvirt-clients
sudo apt-get install -y virtualbox
sudo systemctl enable --now libvirtd
sudo usermod -a -G kvm $USER
sudo usermod -a -G libvirt $USER
sudo usermod -a -G libvirt-qemu $USER
sudo systemctl restart libvirtd
# End set up vagrant etc.
- uses: actions/checkout@v4
- name: Cache Vagrant boxes
id: cache-vagrant
uses: actions/cache@v3
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles( 'Vagrantfile' ) }}
restore-keys: |
${{ runner.os }}-vagrant-
- run: vagrant --version
- run: vagrant up --provision
- run: ./scripts/check-pages.py