-
Notifications
You must be signed in to change notification settings - Fork 14
51 lines (48 loc) · 1.19 KB
/
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
50
51
name: Rust
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
schedule:
- cron: '13 3 * * 0'
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Rust nightly toolchain with clippy
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Run Rustfmt
run: cargo fmt -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Rust nightly toolchain with clippy
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- name: Run Clippy
run: cargo clippy --all-targets --all-features
build:
name: Rust Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run tests (rootful)
run: sudo -E env "PATH=$PATH" bash tests/run_nft_tests.sh