Skip to content

Commit 14a6485

Browse files
committed
chore: run e2e in finch vm
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 7ec7d02 commit 14a6485

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.github/workflows/mac-test.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: macOS Tests
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths-ignore:
7+
- '**.md'
8+
pull_request:
9+
branches:
10+
- main
11+
paths-ignore:
12+
- '**.md'
13+
workflow_dispatch:
14+
env:
15+
GO_VERSION: '1.23.8'
16+
jobs:
17+
mac-test:
18+
runs-on: codebuild-Test-fd-codebuild-mac-${{ github.run_id }}-${{ github.run_attempt }}
19+
timeout-minutes: 30
20+
steps:
21+
- name: Clean macOS runner workspace
22+
run: |
23+
rm -rf ${{ github.workspace }}/*
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
with:
26+
# We need to get all the git tags to make version injection work. See VERSION in Makefile for more detail.
27+
fetch-depth: 0
28+
persist-credentials: false
29+
submodules: recursive
30+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
31+
with:
32+
go-version: ${{ env.GO_VERSION }}
33+
cache: false
34+
- name: Clean up previous files
35+
run: |
36+
sudo rm -rf /opt/finch
37+
sudo rm -rf ~/.finch
38+
sudo rm -rf ./_output
39+
if pgrep '^qemu-system'; then
40+
sudo pkill '^qemu-system'
41+
fi
42+
if pgrep '^socket_vmnet'; then
43+
sudo pkill '^socket_vmnet'
44+
fi
45+
- name: Install Rosetta 2
46+
run: echo "A" | softwareupdate --install-rosetta || true
47+
- run: brew install lz4 automake autoconf libtool yq
48+
shell: zsh {0}
49+
50+
# Install Finch
51+
- name: Install Finch
52+
run: brew install finch
53+
shell: zsh {0}
54+
55+
# Initialize and start Finch VM
56+
- name: Initialize Finch VM
57+
run: finch vm init
58+
59+
- name: Start Finch VM
60+
run: finch vm start
61+
62+
# Run e2e tests inside the Finch VM
63+
- name: Run e2e tests
64+
run: DOCKER_HOST=unix:///Applications/Finch/lima/data/finch/sock/finch.sock make test-e2e
65+
66+
# Run e2e tests with OPA authorization
67+
- name: Run opa e2e tests
68+
run: DOCKER_HOST=unix:///Applications/Finch/lima/data/finch/sock/finch.sock make test-e2e-opa
69+
70+
# Cleanup
71+
- name: Stop Finch VM
72+
run: finch vm stop
73+
if: always()

0 commit comments

Comments
 (0)