-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (91 loc) · 2.88 KB
/
general.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: general code check
on:
push:
branches: [main]
pull_request:
jobs:
fmt:
name: formatting
runs-on: rust
steps:
- uses: actions/checkout@v2
- run: rustup component add rustfmt
- run: cargo fmt -- --check
plugins:
name: plugins
runs-on: rust
steps:
- name: script
run: chmod +x plugins/plugins.sh
- name: check
run: ./plugins/plugins.sh check
- name: clippy
run: ./plugins/plugins.sh clippy
- name: test
run: ./plugins/plugins.sh test
test:
runs-on: rust
env:
RUSTFLAGS: -Dwarnings # fails on warnings as well
ETHEREUM_RPC: ${{ secrets.ETHEREUM_RPC }}
POLYGON_RPC: ${{ secrets.POLYGON_RPC }}
BSC_RPC: ${{ secrets.BSC_RPC }}
GNOSIS_RPC: ${{ secrets.GNOSIS_RPC }}
ARBITRUM_RPC: ${{ secrets.ARBITRUM_RPC }}
GOERLI_RPC: ${{ secrets.GOERLI_RPC }}
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
profile: minimal
- uses: actions-rs/clippy@master
with:
args: --all-features --all-targets
- uses: actions/checkout@v2
- name: build
run: cargo build --color=always --all-targets
- name: clippy
run: cargo clippy --color=always --all-targets --examples --tests
- name: plugins
run: ./plugins/plugins.sh build
- name: config
run: |
cat > ./config.json << EOF
{
"evm_balance": "../plugins/evm_balance/target/release/libevm_balance.so",
"sol_balance": "../plugins/sol_balance/target/release/libsol_balance.so",
"ethereum": {
"rpc_url": "${ETHEREUM_RPC}",
"contract": "0x5ba1e12693dc8f9c48aad8770482f4739beed696"
},
"bsc": {
"rpc_url": "${BSC_RPC}",
"contract": "0x41263cba59eb80dc200f3e2544eda4ed6a90e76c"
},
"gnosis": {
"rpc_url": "${GNOSIS_RPC}",
"contract": "0xb5b692a88bdfc81ca69dcb1d924f59f0413a602a"
},
"polygon": {
"rpc_url": "${POLYGON_RPC}",
"contract": "0x11ce4B23bD875D7F5C6a31084f55fDe1e9A87507"
},
"arbitrum": {
"rpc_url": "${ARBITRUM_RPC}",
"contract": "0x52bfe8fE06c8197a8e3dCcE57cE012e13a7315EB"
},
"goerli": {
"rpc_url": "${GOERLI_RPC}",
"contract": "0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e"
},
"solana_main": "https://api.mainnet-beta.solana.com",
"solana_test": "https://api.testnet.solana.com",
"solana_dev": "https://api.devnet.solana.com"
}
EOF
- name: test
run: |
export CONFIG_PATH=../config.json
cargo t --all-features