|
17 | 17 | regtest-infrastructure: |
18 | 18 | runs-on: ubuntu-latest |
19 | 19 | outputs: |
20 | | - electrum-url: ${{ steps.tunnel-electrum.outputs.url }} |
21 | | - lnd-url: ${{ steps.tunnel-lnd.outputs.url }} |
| 20 | + electrum-url: ${{ env.ELECTRUM_URL }} |
| 21 | + lnd-url: ${{ env.LND_URL }} |
22 | 22 |
|
23 | 23 | steps: |
24 | 24 | - name: Clone E2E tests |
@@ -78,16 +78,50 @@ jobs: |
78 | 78 |
|
79 | 79 | - name: Expose Electrum with Cloudflare Tunnel |
80 | 80 | id: tunnel-electrum |
81 | | - uses: AnimMouse/setup-cloudflared/tunnel@v2 |
82 | | - with: |
83 | | - url: http://localhost:60001 |
| 81 | + run: | |
| 82 | + echo "=== Creating Electrum tunnel ===" |
| 83 | + # Create tunnel manually using cloudflared |
| 84 | + nohup cloudflared tunnel --url http://localhost:60001 > electrum-tunnel.log 2>&1 & |
| 85 | + ELECTRUM_TUNNEL_PID=$! |
| 86 | + echo "ELECTRUM_TUNNEL_PID=$ELECTRUM_TUNNEL_PID" >> $GITHUB_ENV |
| 87 | + echo "Electrum tunnel PID: $ELECTRUM_TUNNEL_PID" |
| 88 | + |
| 89 | + # Wait for tunnel to be ready and extract URL |
| 90 | + sleep 10 |
| 91 | + if [ -f electrum-tunnel.log ]; then |
| 92 | + ELECTRUM_URL=$(grep -o 'https://[^[:space:]]*\.trycloudflare\.com' electrum-tunnel.log | head -1) |
| 93 | + if [ -n "$ELECTRUM_URL" ]; then |
| 94 | + echo "Electrum tunnel URL: $ELECTRUM_URL" |
| 95 | + echo "ELECTRUM_URL=$ELECTRUM_URL" >> $GITHUB_ENV |
| 96 | + else |
| 97 | + echo "Failed to extract Electrum tunnel URL" |
| 98 | + cat electrum-tunnel.log |
| 99 | + fi |
| 100 | + fi |
84 | 101 | continue-on-error: true |
85 | 102 |
|
86 | 103 | - name: Expose LND with Cloudflare Tunnel |
87 | 104 | id: tunnel-lnd |
88 | | - uses: AnimMouse/setup-cloudflared/tunnel@v2 |
89 | | - with: |
90 | | - url: http://localhost:9735 |
| 105 | + run: | |
| 106 | + echo "=== Creating LND tunnel ===" |
| 107 | + # Create tunnel manually using cloudflared |
| 108 | + nohup cloudflared tunnel --url http://localhost:9735 > lnd-tunnel.log 2>&1 & |
| 109 | + LND_TUNNEL_PID=$! |
| 110 | + echo "LND_TUNNEL_PID=$LND_TUNNEL_PID" >> $GITHUB_ENV |
| 111 | + echo "LND tunnel PID: $LND_TUNNEL_PID" |
| 112 | + |
| 113 | + # Wait for tunnel to be ready and extract URL |
| 114 | + sleep 10 |
| 115 | + if [ -f lnd-tunnel.log ]; then |
| 116 | + LND_URL=$(grep -o 'https://[^[:space:]]*\.trycloudflare\.com' lnd-tunnel.log | head -1) |
| 117 | + if [ -n "$LND_URL" ]; then |
| 118 | + echo "LND tunnel URL: $LND_URL" |
| 119 | + echo "LND_URL=$LND_URL" >> $GITHUB_ENV |
| 120 | + else |
| 121 | + echo "Failed to extract LND tunnel URL" |
| 122 | + cat lnd-tunnel.log |
| 123 | + fi |
| 124 | + fi |
91 | 125 | continue-on-error: true |
92 | 126 |
|
93 | 127 | - name: Keep regtest running |
@@ -146,14 +180,12 @@ jobs: |
146 | 180 | |
147 | 181 | # Show tunnel URLs and verify they exist |
148 | 182 | echo "Tunnel URLs:" |
149 | | - echo "Electrum: ${{ steps.tunnel-electrum.outputs.url }}" |
150 | | - echo "LND: ${{ steps.tunnel-lnd.outputs.url }}" |
| 183 | + echo "Electrum: $ELECTRUM_URL" |
| 184 | + echo "LND: $LND_URL" |
151 | 185 | |
152 | 186 | # Verify tunnel URLs are not empty |
153 | | - if [ -z "${{ steps.tunnel-electrum.outputs.url }}" ] || [ -z "${{ steps.tunnel-lnd.outputs.url }}" ]; then |
| 187 | + if [ -z "$ELECTRUM_URL" ] || [ -z "$LND_URL" ]; then |
154 | 188 | echo "❌ ERROR: Tunnel URLs are empty!" |
155 | | - echo "Electrum tunnel result: ${{ steps.tunnel-electrum.outcome }}" |
156 | | - echo "LND tunnel result: ${{ steps.tunnel-lnd.outcome }}" |
157 | 189 | echo "This means the Cloudflare tunnel setup failed." |
158 | 190 | echo "Continuing anyway - E2E tests will handle the error..." |
159 | 191 | else |
|
0 commit comments