Skip to content

Commit b68cc64

Browse files
authored
feat: Add cross-platform testing on macOS (hyperledger-labs#546)
* feat: Add cross-platform testing on macOS Signed-off-by: Osama Rabea <[email protected]> * Fix 'docker: command not found' in test-cross-platform job by adding Docker setup Signed-off-by: Osama Rabea <[email protected]> * Simplify test-cross-platform Signed-off-by: Osama Rabea <[email protected]> * fix(ci): use docker driver for Buildx to support macOS runners Signed-off-by: Osama Rabea <[email protected]> * fix(ci): avoid Docker issues on macOS by using setup-docker-macos-action Signed-off-by: Osama Rabea <[email protected]> * configure test-5-v3 to run on macos-15 arm with Docker + Colima Signed-off-by: Osama Rabea <[email protected]> --------- Signed-off-by: Osama Rabea <[email protected]>
1 parent cc19c93 commit b68cc64

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/test-on-push.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
- name: Lint
4141
run: npm run lint && ./lint.sh
4242

43+
4344
# test-k8:
4445
# needs: test-main
4546
# runs-on: ubuntu-latest
@@ -172,10 +173,32 @@ jobs:
172173
173174
test-05-v3:
174175
needs: test-main
175-
runs-on: ubuntu-latest
176+
runs-on: macos-15
176177
steps:
177178
- name: Check out repository code
178179
uses: actions/checkout@v2
180+
181+
- name: Install Docker + Colima
182+
run: |
183+
brew update
184+
brew install qemu colima docker
185+
brew uninstall --ignore-dependencies lima
186+
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/45464b6c4788a80be3f131ab5e2a4468cdfa960c/Formula/l/lima.rb > lima.rb
187+
brew install lima.rb
188+
LIMACTL_PATH=$(brew --prefix)/bin/limactl
189+
sudo curl -L -o $LIMACTL_PATH https://github.com/mikekazakov/lima-nohvf/raw/master/limactl
190+
sudo chmod +x $LIMACTL_PATH
191+
colima start --network-address --arch arm64 --vm-type=qemu
192+
mkdir -p ~/.docker/cli-plugins
193+
brew install docker-compose
194+
ln -sfn $(brew --prefix)/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose
195+
196+
- name: Install dependencies
197+
run: |
198+
brew install shellcheck yamllint
199+
npm install -g npm@latest
200+
npm install
201+
179202
180203
- name: Build Fablo
181204
run: |

0 commit comments

Comments
 (0)