-
Notifications
You must be signed in to change notification settings - Fork 4
84 lines (77 loc) · 3.12 KB
/
test.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
75
76
77
78
79
80
81
82
83
84
name: nearlend-protocol test automatically
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: deepakputhraya/action-branch-name@master
with:
regex: '^CU-[a-zA-Z0-9]{7,9}_[\-\_a-zA-Z0-9]*' # Branch name should match CU-${task_id}_${branch_name}
# ${task_id} is ticket id from clickup,
# ${branch_name} any meaningful name for the branch
allowed_prefixes: '' # No prefixes allowed
ignore: master,develop # Ignore exactly matching branch names from convention
min_length: 0 # Min length of the branch name
max_length: 255 # Max length of the branch name
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
components: rustfmt, clippy
# cache for dependencies
#- uses: actions/cache@v3
# with:
# path: |
# ~/.cargo/bin
# ~/.cargo/registry/index
# ~/.cargo/registry/cache
# ~/.cargo/git
# ~/.cargo/.crates.toml
# ~/.cargo/.crates2.json
# contracts/target
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/contracts/Cargo.lock') }}
# linter checks omomo
#- uses: actions-rs/cargo@v1
# with:
# command: fmt
# args: --manifest-path ./contracts/Cargo.toml --all -- --check
#- uses: actions-rs/cargo@v1
# with:
# command: clippy
# args: --manifest-path ./contracts/Cargo.toml -- -A clippy::too-many-arguments -A clippy::ptr-offset-with-cast -A clippy::assign-op-pattern -A clippy::manual-range-contains -D warnings
- run: ./build.sh
#- run: ./test.sh
# linter checks leverage trading
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path ./contracts/leverage_trading/Cargo.toml --all -- --check
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path ./contracts/leverage_trading/Cargo.toml -- -A clippy::too-many-arguments -A clippy::too-many-arguments -A clippy::ptr-offset-with-cast -A clippy::assign-op-pattern -A clippy::manual-range-contains -A clippy::manual-clamp -D warnings
- run: cd ./contracts/leverage_trading/ && ./build.sh
- run: cd ./contracts/leverage_trading/ && ./test.sh
# deployment:
# runs-on: ubuntu-latest
# timeout-minutes: 150
# steps:
# - uses: actions/checkout@v3
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# target: wasm32-unknown-unknown
# - uses: actions/setup-node@v3
# with:
# node-version: 14
# - name: use near
# run: npm install -g near-cli
# - name: deploy
# run: |
# echo "${{secrets.MAIN_NEAR_CLI_PRIVATE_KEY}}" > ${{secrets.MAIN_NEAR_CLI_PRIVATE_KEY_PATH}}
# ./deploy.sh --keyPath=${{secrets.MAIN_NEAR_CLI_PRIVATE_KEY_PATH}}