-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (38 loc) · 999 Bytes
/
rust_build.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
name: rust-build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
defaults:
run:
working-directory: ./rust
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
$HOME/.cargo/bin/rustup default stable
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Check format
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy
unit_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
$HOME/.cargo/bin/rustup default stable
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Run unit tests
run: cargo test
- name: Run Rust coverage
run: |
cargo install cargo-tarpaulin
cargo tarpaulin -v