-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (73 loc) · 2.75 KB
/
hermes.yaml
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
name: Hermes Relayer
on:
pull_request: {}
push:
branches: main
# Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
starknet-integration-tests:
name: Run Starknet Integration Tests
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@V27
with:
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v15
with:
name: ibc-starknet
extraPullNames: hermes-sdk,cosmos-nix
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
relayer -> relayer/target
light-client -> light-client/target
- name: Build Cairo contracts
working-directory: ./cairo-contracts
run: |
nix shell ..#scarb -c \
scarb build -p starknet_ibc_contracts
- name: Build Starknet Wasm light client
run: nix build .#ibc-starknet-cw
- name: Run Integration Tests
env:
RUST_BACKTRACE: 1
working-directory: ./relayer
run: |
export ERC20_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_ERC20Mintable.contract_class.json"
export ICS20_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_TransferApp.contract_class.json"
export COMET_CLIENT_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_CometClient.contract_class.json"
export STARKNET_WASM_CLIENT_PATH="$(nix path-info ..#ibc-starknet-cw)/ibc_client_starknet_cw.wasm"
export IBC_CORE_CONTRACT="$(pwd)/../cairo-contracts/target/dev/starknet_ibc_contracts_IBCCore.contract_class.json"
nix develop ..#rust -c \
cargo nextest run --test-threads=2
lint-relayer:
name: Lint Relayer Code
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@V27
with:
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v15
with:
name: ibc-starknet
extraPullNames: hermes-sdk,cosmos-nix
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
relayer -> relayer/target
- name: Run Clippy
working-directory: ./relayer
run: |
nix shell ..#rust -c \
cargo clippy --all-targets --all-features -- -D warnings