Skip to content

Commit 3aeedd3

Browse files
committed
WIP
1 parent 0358f96 commit 3aeedd3

File tree

4 files changed

+152
-75
lines changed

4 files changed

+152
-75
lines changed

.github/workflows/debug-docker.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Debug Docker Setup
22

3-
# on:
4-
# workflow_dispatch:
5-
# pull_request:
3+
on:
4+
workflow_dispatch:
5+
pull_request:
66

77
jobs:
88
debug-docker:
9-
runs-on: macos-latest
9+
runs-on: macos-13
1010

1111
steps:
1212
- name: Checkout

.github/workflows/e2e-tests-arm.yml

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: e2e-tests-arm
22

3-
on:
4-
workflow_dispatch:
5-
pull_request:
3+
# on:
4+
# workflow_dispatch:
5+
# pull_request:
66

77
jobs:
88
docker:
@@ -72,19 +72,14 @@ jobs:
7272
echo "=== Final Colima Status ==="
7373
colima status || echo "Colima still not running"
7474
75-
echo "=== Waiting for Docker to be ready ==="
76-
# Wait for Docker daemon to be ready
77-
for i in {1..30}; do
78-
if docker version >/dev/null 2>&1; then
79-
echo "✅ Docker is ready!"
80-
break
81-
fi
82-
echo "Waiting for Docker... ($i/30)"
83-
sleep 5
84-
done
85-
86-
echo "=== Docker Status ==="
87-
docker version
88-
89-
echo "=== Testing Docker ==="
90-
docker run --rm arm64v8/alpine uname -m
75+
echo "=== CONCLUSION ==="
76+
echo "❌ VZ virtualization is not available on this GitHub Actions runner"
77+
echo "The error shows: 'Virtualization is not available on this hardware'"
78+
echo "This means we cannot run Docker on the same runner as the iOS simulator"
79+
echo ""
80+
echo "🔧 SOLUTIONS:"
81+
echo "1. Use the hybrid approach (Ubuntu for regtest, macOS for iOS tests)"
82+
echo "2. Use a cloud-hosted regtest service"
83+
echo "3. Use a different CI provider that supports virtualization"
84+
echo ""
85+
echo "The hybrid approach in e2e-tests-hybrid.yml is the recommended solution"

.github/workflows/e2e-tests-hybrid.yml

Lines changed: 49 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: e2e-tests-hybrid
22

3-
# on:
4-
# workflow_dispatch:
5-
# pull_request:
3+
on:
4+
workflow_dispatch:
5+
pull_request:
66

77
env:
88
TERM: xterm-256color
@@ -13,12 +13,12 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16-
# Job 1: Run regtest infrastructure on Ubuntu
16+
# Job 1: Run regtest infrastructure on Ubuntu with tunneling
1717
regtest-infrastructure:
1818
runs-on: ubuntu-latest
1919
outputs:
20-
electrum-url: ${{ steps.setup-regtest.outputs.electrum-url }}
21-
lnd-url: ${{ steps.setup-regtest.outputs.lnd-url }}
20+
electrum-url: ${{ steps.tunnel-electrum.outputs.url }}
21+
lnd-url: ${{ steps.tunnel-lnd.outputs.url }}
2222

2323
steps:
2424
- name: Clone E2E tests
@@ -71,11 +71,19 @@ jobs:
7171
echo "Admin macaroon found! Setting permissions..."
7272
chmod -R 777 lnd
7373
74-
# Get the runner's public IP (this will be accessible from other runners)
75-
PUBLIC_IP=$(curl -s https://api.ipify.org)
76-
echo "electrum-url=$PUBLIC_IP:60001" >> $GITHUB_OUTPUT
77-
echo "lnd-url=$PUBLIC_IP:9735" >> $GITHUB_OUTPUT
78-
echo "Regtest infrastructure ready at $PUBLIC_IP"
74+
echo "Regtest infrastructure ready locally"
75+
76+
- name: Expose Electrum with Cloudflare Tunnel
77+
id: tunnel-electrum
78+
uses: cloudflare/cloudflared-action@v2
79+
with:
80+
port: 60001
81+
82+
- name: Expose LND with Cloudflare Tunnel
83+
id: tunnel-lnd
84+
uses: cloudflare/cloudflared-action@v2
85+
with:
86+
port: 9735
7987

8088
- name: Keep regtest running
8189
run: |
@@ -117,6 +125,11 @@ jobs:
117125
# Show Docker containers
118126
echo "Docker containers:"
119127
docker ps
128+
129+
# Show tunnel URLs
130+
echo "Tunnel URLs:"
131+
echo "Electrum: ${{ steps.tunnel-electrum.outputs.url }}"
132+
echo "LND: ${{ steps.tunnel-lnd.outputs.url }}"
120133
121134
# Job 2: Build iOS app and run E2E tests on macOS
122135
e2e-tests:
@@ -338,6 +351,10 @@ jobs:
338351
echo "Updated UDID in capabilities:"
339352
grep -A 5 -B 5 "appium:udid" wdio.conf.ts
340353
354+
# Verify the bundle ID was updated
355+
echo "Updated bundle ID in capabilities:"
356+
grep -A 5 -B 5 "appium:bundleId" wdio.conf.ts
357+
341358
# Don't manually launch the app - let Appium handle it
342359
# Just ensure simulator is ready and app is installed
343360
echo "Ensuring simulator is ready..."
@@ -392,69 +409,49 @@ jobs:
392409
exit 1
393410
fi
394411
395-
# Test electrum server connectivity
412+
echo "✅ Using Cloudflare Tunnel URLs for regtest connectivity"
413+
414+
# Test electrum server connectivity via tunnel
396415
if [ -n "$E2E_ELECTRUM_SERVER" ]; then
397-
ELECTRUM_HOST=$(echo "$E2E_ELECTRUM_SERVER" | cut -d: -f1)
398-
ELECTRUM_PORT=$(echo "$E2E_ELECTRUM_SERVER" | cut -d: -f2)
399-
echo "Testing electrum server at $ELECTRUM_HOST:$ELECTRUM_PORT..."
400-
401-
# Try multiple connection methods
402-
echo "Testing with nc (netcat)..."
403-
if nc -z "$ELECTRUM_HOST" "$ELECTRUM_PORT" 2>/dev/null; then
404-
echo "✅ Electrum server is reachable via nc"
405-
else
406-
echo "❌ Electrum server is not reachable via nc"
407-
fi
408-
409-
echo "Testing with telnet..."
410-
if timeout 5 telnet "$ELECTRUM_HOST" "$ELECTRUM_PORT" 2>/dev/null | grep -q "Connected"; then
411-
echo "✅ Electrum server is reachable via telnet"
412-
else
413-
echo "❌ Electrum server is not reachable via telnet"
414-
fi
416+
echo "Testing electrum server at $E2E_ELECTRUM_SERVER..."
415417
418+
# Test with curl (tunnel URLs are HTTPS)
416419
echo "Testing with curl..."
417-
if curl -s --connect-timeout 5 "http://$ELECTRUM_HOST:$ELECTRUM_PORT" >/dev/null 2>&1; then
418-
echo "✅ Electrum server is reachable via curl"
420+
if curl -s --connect-timeout 10 "$E2E_ELECTRUM_SERVER" >/dev/null 2>&1; then
421+
echo "✅ Electrum server is reachable via tunnel"
419422
else
420-
echo "❌ Electrum server is not reachable via curl"
423+
echo "❌ Electrum server is not reachable via tunnel"
421424
fi
422425
fi
423426
424-
# Test LND connectivity
427+
# Test LND connectivity via tunnel
425428
if [ -n "$E2E_LND_URL" ]; then
426-
LND_HOST=$(echo "$E2E_LND_URL" | cut -d: -f1)
427-
LND_PORT=$(echo "$E2E_LND_URL" | cut -d: -f2)
428-
echo "Testing LND at $LND_HOST:$LND_PORT..."
429-
if nc -z "$LND_HOST" "$LND_PORT" 2>/dev/null; then
430-
echo "✅ LND is reachable"
429+
echo "Testing LND at $E2E_LND_URL..."
430+
if curl -s --connect-timeout 10 "$E2E_LND_URL" >/dev/null 2>&1; then
431+
echo "✅ LND is reachable via tunnel"
431432
else
432-
echo "❌ LND is not reachable"
433+
echo "❌ LND is not reachable via tunnel"
433434
echo "This will cause tests to fail. Check if the regtest infrastructure job is still running."
434435
fi
435436
fi
436437
437438
# Check if we should continue with tests despite connectivity issues
438439
if [ -n "$E2E_ELECTRUM_SERVER" ] && [ -n "$E2E_LND_URL" ]; then
439-
ELECTRUM_HOST=$(echo "$E2E_ELECTRUM_SERVER" | cut -d: -f1)
440-
ELECTRUM_PORT=$(echo "$E2E_ELECTRUM_SERVER" | cut -d: -f2)
441-
LND_HOST=$(echo "$E2E_LND_URL" | cut -d: -f1)
442-
LND_PORT=$(echo "$E2E_LND_URL" | cut -d: -f2)
443-
444-
if ! nc -z "$ELECTRUM_HOST" "$ELECTRUM_PORT" 2>/dev/null || ! nc -z "$LND_HOST" "$LND_PORT" 2>/dev/null; then
445-
echo "⚠️ WARNING: Regtest services are not reachable. Tests will likely fail."
440+
if ! curl -s --connect-timeout 5 "$E2E_ELECTRUM_SERVER" >/dev/null 2>&1 || ! curl -s --connect-timeout 5 "$E2E_LND_URL" >/dev/null 2>&1; then
441+
echo "⚠️ WARNING: Regtest services are not reachable via tunnel. Tests will likely fail."
446442
echo "This could be due to:"
447443
echo "1. The regtest infrastructure job has stopped"
448-
echo "2. Network connectivity issues between runners"
449-
echo "3. Firewall blocking the connections"
444+
echo "2. Cloudflare tunnel issues"
445+
echo "3. Network connectivity issues"
450446
echo ""
451447
echo "🔧 SOLUTIONS TO TRY:"
452448
echo "1. Check if the regtest-infrastructure job is still running"
453-
echo "2. Use a different regtest service (e.g., Blockstream's regtest API)"
454-
echo "3. Run regtest on the same macOS runner (if Docker works)"
455-
echo "4. Use a cloud-hosted regtest service"
449+
echo "2. Check Cloudflare tunnel logs"
450+
echo "3. Use a different regtest service (e.g., Blockstream's regtest API)"
456451
echo ""
457452
echo "Continuing with tests anyway..."
453+
else
454+
echo "✅ Regtest services are reachable via Cloudflare tunnels"
458455
fi
459456
fi
460457
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: e2e-tests-intel
2+
3+
# on:
4+
# workflow_dispatch:
5+
# pull_request:
6+
7+
jobs:
8+
docker:
9+
runs-on: macos-13
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Check system info
16+
run: |
17+
echo "=== System Information ==="
18+
uname -a
19+
sw_vers
20+
echo "=== Available commands ==="
21+
which brew
22+
which docker || echo "Docker not found"
23+
24+
- name: Install Docker (via Colima)
25+
run: |
26+
brew install colima docker
27+
28+
# Check available VM types
29+
echo "Available VM types:"
30+
colima start --help | grep -A 10 "vm-type" || echo "Help not available"
31+
32+
echo "Trying VZ VM type..."
33+
if ! colima start --arch aarch64 --vm-type=vz --memory 4 --cpu 2; then
34+
echo "Direct start failed, trying brew services approach..."
35+
brew services start colima
36+
sleep 10
37+
fi
38+
39+
- name: Test Docker
40+
run: |
41+
echo "=== Colima Status ==="
42+
colima status || echo "Colima not running"
43+
44+
echo "=== Colima Configuration ==="
45+
colima list || echo "No Colima instances"
46+
47+
echo "=== Colima Logs (startup) ==="
48+
if [ -f "/Users/runner/.colima/_lima/colima/ha.stderr.log" ]; then
49+
echo "Host agent stderr:"
50+
tail -20 "/Users/runner/.colima/_lima/colima/ha.stderr.log"
51+
else
52+
echo "No stderr log found"
53+
fi
54+
55+
if [ -f "/Users/runner/.colima/_lima/colima/ha.stdout.log" ]; then
56+
echo "Host agent stdout:"
57+
tail -20 "/Users/runner/.colima/_lima/colima/ha.stdout.log"
58+
else
59+
echo "No stdout log found"
60+
fi
61+
62+
echo "=== System Virtualization Support ==="
63+
sysctl kern.hv_support || echo "No HV support"
64+
sysctl kern.vm_guest || echo "No VM guest info"
65+
66+
echo "=== Brew Services Status ==="
67+
brew services list | grep colima || echo "No colima service found"
68+
69+
echo "=== Trying to start Colima manually with VZ ==="
70+
colima start --vm-type=vz --memory 2 --cpu 1 || echo "VZ manual start failed"
71+
72+
echo "=== Final Colima Status ==="
73+
colima status || echo "Colima still not running"
74+
75+
echo "=== CONCLUSION ==="
76+
echo "❌ VZ virtualization is not available on this GitHub Actions runner"
77+
echo "The error shows: 'Virtualization is not available on this hardware'"
78+
echo "This means we cannot run Docker on the same runner as the iOS simulator"
79+
echo ""
80+
echo "🔧 SOLUTIONS:"
81+
echo "1. Use the hybrid approach (Ubuntu for regtest, macOS for iOS tests)"
82+
echo "2. Use a cloud-hosted regtest service"
83+
echo "3. Use a different CI provider that supports virtualization"
84+
echo ""
85+
echo "The hybrid approach in e2e-tests-hybrid.yml is the recommended solution"

0 commit comments

Comments
 (0)