forked from Aperture-Finance/Aperture-Lens
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (40 loc) · 988 Bytes
/
rust.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
name: Rust
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
jobs:
setup:
uses: ./.github/workflows/default-setup.yml
lint:
name: Lint
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Setup
id: setup
uses: ./.github/workflows/default-setup.yml
- name: Install Rust toolchain via rustup
run: |
rustup override set nightly
rustup component add clippy --toolchain nightly
- name: Check linting
run: cargo clippy --all-targets --all-features -- -D warnings
test:
needs: [ setup, lint ]
name: Test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Setup
id: setup
uses: ./.github/workflows/default-setup.yml
- name: Build
run: cargo build
- name: Run tests
run: cargo test --lib -- --test-threads=1