Skip to content

Commit 4e1b3e7

Browse files
committed
ci: fix e2e workflow
1 parent 36d1e1c commit 4e1b3e7

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
package: interlay-runtime-parachain
1717
runtime_dir: parachain/runtime/interlay
1818
chain: interlay
19+
1920
- name: Save Interlay runtime
2021
uses: actions/upload-artifact@v4
2122
with:
@@ -82,7 +83,7 @@ jobs:
8283

8384
- name: Run chopsticks
8485
env:
85-
WASM_PATH: ${{ steps.runtime.outputs.wasm_path }}
86+
WASM_PATH: ${{ steps.runtime.outputs.wasm_path }}
8687
run: |
8788
npx @acala-network/chopsticks xcm \
8889
-r chopsticks_configs/polkadot.yml \
@@ -94,7 +95,11 @@ jobs:
9495

9596
- name: Wait for chopsticks
9697
run: |
97-
timeout 36 sh -c 'until nc -z $0 $1; do echo -n .; sleep 1; done' localhost 8000
98+
for port in 8000 8001 8002 8003; do
99+
echo "⏳ Waiting for port $port..."
100+
timeout 60 sh -c "until nc -z localhost $port; do echo -n .; sleep 1; done"
101+
echo " ✅ Port $port ready"
102+
done
98103
99104
- name: Run tests
100105
run: |

e2e_tests/utils/setup.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ export function TestBuilder(title: string, cb: () => void) {
5050
this.hydrationPairs = { alice: keyring.addFromUri("//Alice"), bob: keyring.addFromUri("//Bob") };
5151

5252
const interlayProvider = new WsProvider(`ws://${CHOPSTICKS_INTERLAY_NODE_IP}`);
53-
const apiInterlay = await ApiPromise.create({ provider: interlayProvider });
53+
const apiInterlay = await new ApiPromise({ provider: interlayProvider }).isReady;
5454

5555
const assetHubProvider = new WsProvider(`ws://${CHOPSTICKS_ASSET_HUB_NODE_IP}`);
56-
const apiAssetHub = await ApiPromise.create({ provider: assetHubProvider });
56+
const apiAssetHub = await new ApiPromise({ provider: assetHubProvider }).isReady;
5757

5858
const hydrationProvider = new WsProvider(`ws://${CHOPSTICKS_HYDRATION_NODE_IP}`);
59-
const apiHydration = await ApiPromise.create({ provider: hydrationProvider });
59+
const apiHydration = await new ApiPromise({ provider: hydrationProvider }).isReady;
6060

6161
const polkadotProvider = new WsProvider(`ws://${CHOPSTICKS_POLKADOT_NODE_IP}`);
62-
const apiPolkadot = await ApiPromise.create({ provider: polkadotProvider });
62+
const apiPolkadot = await new ApiPromise({ provider: polkadotProvider }).isReady;
6363

6464
this.chains = {
6565
interlay: apiInterlay,

0 commit comments

Comments
 (0)