Skip to content

Commit 81b21fc

Browse files
authored
Use selfhosted runners (#135)
* fix(ci): add curl to Vagrantfile * fix(ci): use selfhosted runner * fix(tests/net): use exit in if block
1 parent 5f15906 commit 81b21fc

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.github/workflows/vagrant.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@ jobs:
1919
- debianlvm
2020
- rocky9
2121
- fedora33
22-
runs-on: macos-12
22+
runs-on: self-hosted
2323
steps:
2424
- uses: actions/checkout@v3
2525

2626
- name: Start vagrant box
2727
run: vagrant up ${{ matrix.vagrant_target }}
28+
29+
- name: Stop vagrant box
30+
run: vagrant destroy -f ${{ matrix.vagrant_target }}
31+
if: ${{ success() || failure() }} # we want to run this step even if the last step failed

Vagrantfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Vagrant.configure("2") do |config|
1111
debian.vm.provision "file", source: "./", destination: "/home/vagrant/try"
1212
debian.vm.provision "shell", privileged: false, inline: "
1313
sudo apt-get update
14-
sudo apt-get install -y git expect
14+
sudo apt-get install -y git expect curl
1515
sudo chown -R vagrant:vagrant try
1616
cd try
1717
scripts/run_tests.sh
@@ -39,7 +39,7 @@ Vagrant.configure("2") do |config|
3939
debianlvm.vm.provision "file", source: "./", destination: "/home/vagrant/try"
4040
debianlvm.vm.provision "shell", privileged: false, inline: "
4141
sudo apt-get update
42-
sudo apt-get install -y git expect lvm2 mergerfs
42+
sudo apt-get install -y git expect lvm2 mergerfs curl
4343
4444
# Create an image for the lvm disk
4545
sudo fallocate -l 2G /root/lvm_disk.img
@@ -74,7 +74,7 @@ Vagrant.configure("2") do |config|
7474
rocky.vm.box = "generic/rocky9"
7575
rocky.vm.provision "file", source: "./", destination: "/home/vagrant/try"
7676
rocky.vm.provision "shell", privileged: false, inline: "
77-
sudo yum install -y git expect
77+
sudo yum install -y git expect curl
7878
sudo chown -R vagrant:vagrant try
7979
cd try
8080
TRY_TOP=$(pwd) scripts/run_tests.sh
@@ -86,7 +86,7 @@ Vagrant.configure("2") do |config|
8686
fedora.vm.box = "generic/fedora33"
8787
fedora.vm.provision "file", source: "./", destination: "/home/vagrant/try"
8888
fedora.vm.provision "shell", privileged: false, inline: "
89-
sudo yum install -y git expect
89+
sudo yum install -y git expect curl
9090
sudo chown -R vagrant:vagrant try
9191
cd try
9292
TRY_TOP=$(pwd) scripts/run_tests.sh

test/network.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ TRY="$TRY_TOP/try"
1212
"$TRY" -x curl 1.1
1313
if [ $? -eq 7 ]
1414
then
15-
return 0
15+
exit 0
1616
else
17-
return 1
17+
exit 1
1818
fi

0 commit comments

Comments
 (0)