Skip to content

Commit b1c833b

Browse files
committed
ci: use Multipass instead of Vagrant
1 parent 8252427 commit b1c833b

2 files changed

Lines changed: 23 additions & 45 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,31 +66,35 @@ jobs:
6666
runs-on: ubuntu-latest
6767

6868
steps:
69-
- uses: actions/checkout@v3
69+
- uses: actions/checkout@v4
7070

71-
- name: Install vagrant
71+
- name: Install Multipass
7272
run: |
73-
sudo apt update
74-
sudo apt install -y vagrant libvirt-daemon libvirt-daemon-driver-qemu libvirt-clients libvirt-daemon-system
75-
sudo chmod a+rw /var/run/libvirt/libvirt-sock
76-
77-
- name: Cache Vagrant boxes
78-
uses: actions/cache@v3
79-
with:
80-
path: ~/.vagrant.d/boxes
81-
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
82-
restore-keys: |
83-
${{ runner.os }}-vagrant-
73+
sudo snap install multipass --classic
74+
sudo snap wait system seed.loaded
75+
sleep 5
8476
85-
- name: Start vagrant VM
77+
- name: Start Multipass VM
8678
run: |
87-
cp tests/Vagrantfile .
88-
vagrant up
79+
sudo multipass launch 24.04 -n test-vm
80+
sleep 10
8981
90-
- name: Run tests in vagrant vm
82+
- name: Run tests in Multipass VM
9183
run: |
92-
vagrant ssh vm -c 'cd /vagrant && /venv/bin/tox -e py -- -vv'
93-
84+
set -x
85+
sudo multipass exec test-vm -- sudo modprobe snd-seq-device
86+
sudo multipass exec test-vm -- sudo modprobe snd-seq-dummy
87+
sudo multipass exec test-vm -- sudo modprobe snd-rawmidi
88+
sudo multipass transfer --recursive $PWD test-vm:/home/ubuntu/code
89+
sudo multipass exec test-vm -- sudo apt install -y python3-cffi python3-venv python3-pip python3-wheel python3-venv libffi-dev libasound-dev alsa-utils
90+
curl -LsSf https://astral.sh/uv/install.sh | sudo multipass exec test-vm -- sh
91+
sudo multipass exec test-vm -- bash -c '. $HOME/.local/bin/env && cd code && uvx tox -r -vv -e py -- -vv'
92+
93+
- name: Stop and delete VM
94+
run: |
95+
sudo multipass stop test-vm
96+
sudo multipass delete test-vm
97+
sudo multipass purge
9498
9599
build-pure:
96100

tests/Vagrantfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)