-
Notifications
You must be signed in to change notification settings - Fork 9
90 lines (75 loc) · 2.14 KB
/
build.yml
File metadata and controls
90 lines (75 loc) · 2.14 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
BUILD_PROFILE: debug
RUST_TOOLCHAIN: nightly-2022-10-25
jobs:
build-project:
runs-on: ubuntu-latest
steps:
- name: Fetch latest code
uses: actions/checkout@v3
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_TOOLCHAIN }}
target: wasm32-unknown-unknown
override: true
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
default: true
profile: minimal
target: wasm32-unknown-unknown
toolchain: stable
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
- name: Build
run: |
CARGO_INCREMENTAL=0 cargo build --release
- name: Save ice-node binary for ts-tests
uses: actions/cache/save@v3
with:
path: target/release/ice-node
key: ice-node-${{ github.run_id }}
run-tests:
runs-on: ubuntu-latest
needs: build-project
steps:
- name: Fetch latest code
uses: actions/checkout@v3
- name: Restore ice-node binary
uses: actions/cache/restore@v3
with:
path: target/release/ice-node
key: ice-node-${{ github.run_id }}
fail-on-cache-miss: true
- name: Prepare ice-node binary
run: |
chmod +x target/release/ice-node
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Run evm ts tests
run: |
npm install -g yarn
cd ts-tests/evm
yarn install
yarn run build
yarn run test
- name: Run ink ts tests
env:
TEST_INK_WALLET_SEED_1: ${{ secrets.TEST_INK_WALLET_SEED_1 }}
TEST_INK_WALLET_SEED_2: ${{ secrets.TEST_INK_WALLET_SEED_2 }}
run: |
cd ts-tests/ink
npm install --force
npm run test:server