-
Notifications
You must be signed in to change notification settings - Fork 4
74 lines (58 loc) · 1.66 KB
/
main.yml
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
name: Main
on:
push:
branches:
- main
- dev
pull_request:
branches:
- dev
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js & pnpm
uses: ./.github/actions/node-pnpm
- name: Lint
run: pnpm lint
- name: Use Golang
uses: actions/setup-go@v5
with:
go-version: 1.19
cache-dependency-path: |
xsuite-fullsimulnet/build-binary.mjs
xsuite-lightsimulnet/src/go.sum
- name: Build xsuite-fullsimulnet
run: pnpm build-xsuite-fullsimulnet
- name: Build xsuite-lightsimulnet
run: pnpm build-xsuite-lightsimulnet
- name: Build xsuite
run: pnpm build-xsuite
- name: Install Rust
run: |
pnpm xsuite install-rust
echo "RUST_KEY=$(pnpm xsuite install-rust-key)" >> $GITHUB_ENV
- name: Cache Rust
uses: actions/cache@v4
with:
path: |
~/.cargo/
target/
key: rust-${{ runner.os }}-${{ env.RUST_KEY }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: rust-${{ runner.os }}-
- name: Test xsuite
run: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
pnpm test-xsuite
- name: Verify xsuite wasms
run: pnpm verify-xsuite-wasms
- name: Build contracts
run: pnpm build-contracts
- name: Typecheck contracts
run: pnpm typecheck-contracts
- name: Test contracts
run: pnpm test-contracts