-
Notifications
You must be signed in to change notification settings - Fork 50
53 lines (48 loc) · 1.42 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
name: Workspace Checks & Tests
on:
push:
branches: [ main ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Clippy and fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- name: Check Formatting
run: cargo fmt -- --check
- name: Check Clippy
run: cargo clippy --tests -- -Dclippy::all
test:
needs: check
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
# TODO: Bring `stable` back to the matrix once Rust 1.70.0+ compatibility is resolved in nearcore:
# https://github.com/near/nearcore/issues/9143
toolchain: [1.69.0]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: "${{ matrix.toolchain }}"
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
default: true
- uses: Swatinem/rust-cache@v1
- name: Add wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Check with stable features
run: cargo check --verbose
- name: Run tests with unstable features
run: NEAR_RPC_TIMEOUT_SECS=100 cargo test --verbose --features unstable