chore: update module github.com/siderolabs/go-blockdevice to v2 #323
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: acceptance-tests | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
paths: | |
- 'go.mod' | |
- 'go.sum' | |
- '**.go' | |
jobs: | |
acc-tests: | |
if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/')) | |
runs-on: | |
- self-hosted | |
- generic | |
env: | |
GOTOOLCHAIN: local | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- name: Set up Terraform | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_wrapper: false | |
- name: Set up libvirt | |
env: | |
LIBVIRT_DEFAULT_URI: qemu:///system | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends -y \ | |
bridge-utils \ | |
dnsmasq-base \ | |
libvirt-daemon-system \ | |
qemu-kvm \ | |
qemu-utils \ | |
qemu-block-extra \ | |
ovmf | |
sudo virtlockd -d | |
sudo virtlogd -d | |
sudo libvirtd -d | |
echo -e "<pool type='dir'>\n<name>default</name>\n<target>\n<path>/pool-default</path>\n</target>\n</pool>" > pool.xml | |
sudo mkdir /pool-default | |
sudo chmod a+rwx /pool-default | |
sudo virsh pool-define pool.xml | |
sudo virsh pool-start default | |
echo 'security_driver = "none"' | sudo tee --append /etc/libvirt/qemu.conf | |
cat <<EOF > net.xml | |
<network> | |
<name>default</name> | |
<bridge name='virbr0'/> | |
<mtu size="1350"/> | |
<forward/> | |
<ip address='192.168.122.1' netmask='255.255.255.0'> | |
<dhcp> | |
<range start='192.168.122.2' end='192.168.122.254'/> | |
</dhcp> | |
</ip> | |
</network> | |
EOF | |
sudo virsh net-destroy default | |
sudo virsh net-undefine default | |
sudo virsh net-create net.xml | |
- name: acceptance-test | |
env: | |
TERRAFORM_LIBVIRT_TEST_DOMAIN_TYPE: qemu | |
LIBVIRT_DEFAULT_URI: qemu:///system | |
CI: "true" | |
run: | | |
make testacc |