Skip to content

Commit 5ab6582

Browse files
authored
Merge pull request #1254 from interlay/interlay/ahm-backport
chore: AH Migration backport for Interlay
2 parents cc935b5 + e41c51a commit 5ab6582

31 files changed

+13777
-45
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Cache NPM'
2+
description: 'Caching npm dependencies'
3+
inputs:
4+
cache-key:
5+
description: 'Key to use when caching npm dependencies'
6+
required: true
7+
default: 'npm-default'
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Cache NPM dependencies
12+
uses: actions/cache@v3
13+
with:
14+
path: |
15+
~/.npm
16+
node_modules
17+
key: ${{ runner.os }}-npm-${{ inputs.cache-key }}-${{ hashFiles('**/package-lock.json') }}
18+
restore-keys: |
19+
${{ runner.os }}-npm-${{ inputs.cache-key }}-
20+
${{ runner.os }}-npm-

.github/workflows/draft-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Publish draft release
33
on:
44
push:
55
tags:
6-
- "v[0-9]+.[0-9]+.[0-9]+.*"
7-
- "[0-9]+.[0-9]+.[0-9]+.*"
6+
- "*"
87
workflow_dispatch:
98

109
jobs:

.github/workflows/e2e.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: E2E Tests
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout sources
10+
uses: actions/checkout@v4
11+
12+
- name: Build Interlay runtime
13+
id: srtool_build
14+
uses: paritytech/srtool-actions@v0.9.3
15+
with:
16+
package: interlay-runtime-parachain
17+
runtime_dir: parachain/runtime/interlay
18+
chain: interlay
19+
20+
- name: Save Interlay runtime
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: interlay-runtime
24+
path: |
25+
${{ steps.srtool_build.outputs.wasm_compressed }}
26+
27+
lint:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v3
31+
- uses: ./.github/actions/cache-npm
32+
with:
33+
cache-key: npm
34+
35+
- name: Use Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: 'lts/*'
39+
40+
- name: Install npm-dependencies
41+
run: |
42+
npm install
43+
working-directory: ./e2e_tests
44+
45+
- name: Run lint
46+
run: |
47+
npm run fmt-check
48+
working-directory: ./e2e_tests
49+
50+
tests:
51+
needs: [build, lint]
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v3
55+
- uses: ./.github/actions/cache-npm
56+
with:
57+
cache-key: npm
58+
59+
- name: Download Interlay runtime
60+
uses: actions/download-artifact@v4
61+
with:
62+
name: interlay-runtime
63+
path: ./e2e_tests/artifacts
64+
65+
- name: Detect runtime path
66+
id: runtime
67+
run: |
68+
find ./artifacts
69+
wasm=$(find ./artifacts -type f -name '*.wasm' | head -n1)
70+
echo "Found runtime wasm: $wasm"
71+
echo "wasm_path=$wasm" >> $GITHUB_OUTPUT
72+
working-directory: ./e2e_tests
73+
74+
- name: Use Node.js
75+
uses: actions/setup-node@v4
76+
with:
77+
node-version: 'lts/*'
78+
79+
- name: Install npm-dependencies
80+
run: |
81+
npm install
82+
working-directory: ./e2e_tests
83+
84+
- name: Run chopsticks
85+
env:
86+
WASM_PATH: ${{ steps.runtime.outputs.wasm_path }}
87+
run: |
88+
npx @acala-network/chopsticks xcm \
89+
-r chopsticks_configs/polkadot.yml \
90+
-p chopsticks_configs/interlay.yml \
91+
-p chopsticks_configs/polkadot_ah.yml \
92+
-p hydradx &
93+
echo "Chopsticks started"
94+
working-directory: ./e2e_tests
95+
96+
- name: Wait for chopsticks
97+
run: |
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
103+
104+
- name: Run tests
105+
run: |
106+
npm run test
107+
working-directory: ./e2e_tests

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ genesis-wasm
1919
rococo-local.json
2020
rococo-local-raw.json
2121

22+
## Node
23+
node_modules
24+
2225
*.log
2326

2427
### Testdata
25-
data/bitcoin-testdata.json
28+
data/bitcoin-testdata.json

0 commit comments

Comments
 (0)