Skip to content

Commit

Permalink
fix: add docker
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi committed Dec 10, 2024
1 parent 0d776b3 commit aad7376
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/e2e-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:

jobs:
e2e-test:
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v4

Expand All @@ -23,20 +23,23 @@ jobs:
- name: List available simulators
run: xcrun simctl list devices available

- name: Create iOS Simulator
run: |
DEVICE_ID=$(xcrun simctl create "iPhone SE (3rd generation)" com.apple.CoreSimulator.SimDeviceType.iPhone-SE-3rd-generation com.apple.CoreSimulator.SimRuntime.iOS-18-1)
echo "DEVICE_ID=$DEVICE_ID" >> $GITHUB_ENV
- name: Boot Simulator
run: xcrun simctl boot $DEVICE_ID
- name: Set up Docker
uses: douglascamata/setup-docker-macos-action@v1-alpha

- name: Install dependencies
run: nix develop -c yarn install

- name: Build E2E tests
run: nix develop -c yarn e2e:build ios.sim.debug

- name: Create iOS Simulator
run: |
DEVICE_ID=$(xcrun simctl create "iPhone SE (3rd generation)" com.apple.CoreSimulator.SimDeviceType.iPhone-SE-3rd-generation com.apple.CoreSimulator.SimRuntime.iOS-17-2)
echo "DEVICE_ID=$DEVICE_ID" >> $GITHUB_ENV
- name: Boot Simulator
run: xcrun simctl boot $DEVICE_ID

- name: Start Metro, Tilt, Emulator, and run tests
id: run-tests
run: |
Expand All @@ -48,7 +51,7 @@ jobs:
echo $! > /tmp/pids/metro.pid
# Start Tilt in background
cd dev && nix develop -c tilt up &
nix develop -c tilt up -f ./dev/Tiltfile &
echo $! > /tmp/pids/tilt.pid
# Wait for galoy UI resource to be ready (timeout after 5 minutes)
Expand All @@ -66,7 +69,7 @@ jobs:
echo $! > /tmp/pids/sim_record.pid
# Trigger dev setup and run tests
cd dev && nix develop -c tilt trigger dev-setup
nix develop -c tilt trigger dev-setup
nix develop -c tilt wait --for=condition=Ready "uiresource/dev-setup" --timeout=5m
# Run the E2E tests
Expand Down Expand Up @@ -97,7 +100,7 @@ jobs:
done
# Additional cleanup commands just to be thorough
cd dev && nix develop -c tilt down
nix develop -c tilt down -f ./dev/Tiltfile
pkill -f "node.*metro" || true
pkill -f "tilt" || true
Expand Down

0 comments on commit aad7376

Please sign in to comment.