-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (60 loc) · 1.76 KB
/
chain-interaction.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
name: Chain interaction
on:
pull_request:
jobs:
chain_interaction:
name: Test interaction with chain
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Verify .rs and toml files 👀
uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/**.rs
**/**.toml
**/Cargo.lock
FILES: |
Cargo.lock
- name: Setup Rust ⚙
if: env.GIT_DIFF
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.71.1
override: true
components: rustfmt, clippy
- name: Install cargo run script ⚙
if: env.GIT_DIFF
run: cargo install cargo-run-script
- name: Precreate build dir ⚙
if: env.GIT_DIFF
run: mkdir -p ./target/debug
- name: Build test contract ⚙
if: env.GIT_DIFF
working-directory: ./contracts/test-contract
run: cargo optimize
- name: Checkout desmos source 🛎
if: env.GIT_DIFF
uses: actions/checkout@v3
with:
repository: desmos-labs/desmos
ref: v6.2.0
path: ./desmos-src
- name: Build desmos chain ⚙
if: env.GIT_DIFF
run: make build-alpine && mv build/desmos ../scripts/desmos
working-directory: ./desmos-src
- name: Run tests 🧪
if: env.GIT_DIFF
working-directory: ./packages/bindings-test
run: |
../../scripts/spawn_test_chain.sh -b
sleep 2
../../scripts/upload_test_contract.sh
cargo run
../../scripts/setup_chain.sh
cargo test -- --test-threads=1