Skip to content

Commit f34aebb

Browse files
committed
.github/workflows/test.yml: Add limactl to firewall
Signed-off-by: Norio Nomura <[email protected]>
1 parent 1fc6e86 commit f34aebb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,16 @@ jobs:
528528
run: brew install bash coreutils w3m socat
529529
- name: Uninstall qemu
530530
run: brew uninstall --ignore-dependencies --force qemu
531+
- name: "Allow limactl to firewall"
532+
if: matrix.create_arg == '--network=vzNAT'
533+
# Avoid macOS firewall prompt by pre-adding limactl to the firewall
534+
run: |
535+
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add $(command -v limactl)
536+
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
537+
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getblockall
538+
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getallowsigned
539+
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode
540+
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --listapps
531541
- name: Test
532542
run: ./hack/test-templates.sh templates/${{ matrix.template }}
533543
- if: failure()

0 commit comments

Comments
 (0)