Skip to content

Commit b009524

Browse files
authored
Merge pull request #26 from AkihiroSuda/dev
CI: add Lima integration test
2 parents 663d91e + cedd8bd commit b009524

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,29 @@ jobs:
4545
- name: Test (shared mode)
4646
run: ./test/test.sh /var/run/socket_vmnet
4747
# Bridged mode cannot be tested on GHA
48+
- uses: actions/setup-go@v3
49+
with:
50+
go-version: 1.19.x
51+
- name: Install Lima
52+
run: |
53+
git clone https://github.com/lima-vm/lima
54+
cd lima
55+
git checkout v0.14.2
56+
make
57+
sudo make install
58+
limactl sudoers >etc_sudoers.d_lima
59+
sudo install -o root etc_sudoers.d_lima "/private/etc/sudoers.d/lima"
60+
- name: Install the dependencies for the Lima integration test
61+
run: brew install iperf3 jq
62+
- name: "Lima: iperf3 (host -> vm1)"
63+
run: |
64+
limactl start --name=vm1 --tty=false template://vmnet
65+
limactl shell vm1 sudo DEBIAN_FRONTEND=noninteractive apt-get install -y iperf3
66+
limactl shell vm1 systemd-run --user --unit=iperf3 iperf3 -s
67+
limactl shell vm1 ip -4 -json addr show dev lima0 | jq -r .[0].addr_info[0].local | tee /tmp/vm1_iP
68+
iperf3 -c "$(cat /tmp/vm1_ip)"
69+
- name: "Lima: iperf3 (vm2 -> vm1)"
70+
run: |
71+
limactl start --name=vm2 --tty=false template://vmnet
72+
limactl shell vm2 sudo DEBIAN_FRONTEND=noninteractive apt-get install -y iperf3
73+
limactl shell vm2 iperf3 -c "$(cat /tmp/vm1_ip)"

0 commit comments

Comments
 (0)