-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (52 loc) · 1.69 KB
/
integration-tests.yaml
File metadata and controls
64 lines (52 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Integration Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
integration-tests:
runs-on: ubuntu-latest
name: Run integration tests with farmerless dev node
timeout-minutes: 30
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: Enable Corepack
run: corepack enable
- name: Set Yarn version to Berry
run: corepack prepare yarn@4.7.0 --activate
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build all packages 🔧
run: yarn build
- name: Start farmerless dev node 🐳
working-directory: integration-tests
run: yarn docker:up
env:
BLOCK_INTERVAL_MS: 100
- name: Wait for node to be ready
working-directory: integration-tests
run: |
timeout 120 bash -c 'until curl -sf -H "Content-Type: application/json" -d "{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"system_health\",\"params\":[]}" http://localhost:9944 > /dev/null; do sleep 2; done'
continue-on-error: false
- name: Run integration tests 🧪
run: yarn test:integration
env:
TEST_MODE: farmerless
CONSENSUS_RPC_URL: ws://127.0.0.1:9944
DOMAIN_RPC_URL: ws://127.0.0.1:9945
- name: Show logs on failure
if: failure()
working-directory: integration-tests
run: yarn docker:logs
- name: Cleanup containers
if: always()
working-directory: integration-tests
run: yarn docker:down