-
Notifications
You must be signed in to change notification settings - Fork 26
69 lines (66 loc) · 2 KB
/
on_pull_request.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
name: "Check PR is ready for merge"
on:
pull_request:
branches:
- main
jobs:
lint:
name: "Lint"
runs-on:
group: ubuntu-22.04-8core
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: Swatinem/rust-cache@v2
- name: 📜 Lint code format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
test-rust:
name: "Test Rust"
runs-on:
group: ubuntu-22.04-16core
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: Swatinem/rust-cache@v2
- name: "Install cargo-nextest"
uses: taiki-e/install-action@v2
with:
tool: nextest
- name: "Build contracts"
run: make build-contracts
- name: "Ensure target dir exists"
run: mkdir -p target/near/near_da_blob_store
- name: "Run tests"
run: TEST_NEAR_ACCOUNT=${{ secrets.TEST_NEAR_ACCOUNT }} TEST_NEAR_SECRET=${{ secrets.TEST_NEAR_SECRET }} cargo nextest run --workspace --locked
# Nice to have, turned off for now
# - name: "Check for bloat"
# uses: orf/cargo-bloat-action@v1
# with:
# token: ${{ secrets.CEJAS_PERSONAL_ACCESS_TOKEN }}
test-go:
name: "Test gopkg"
runs-on:
group: ubuntu-22.04-8core
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: "Ubuntu is missing libm :<"
run: sudo apt-get update && sudo apt-get install -y build-essential
- name: "Install FFI library"
run: make da-rpc-sys
- run: sudo cp ./gopkg/da-rpc/lib/* /usr/local/lib
- name: "Test gopkg"
working-directory: ./gopkg/da-rpc
run: go test -v