-
Notifications
You must be signed in to change notification settings - Fork 42
59 lines (46 loc) · 1.21 KB
/
unit-tests-suite.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
---
name: Unit tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: false
env:
CARGO_TERM_COLOR: always
jobs:
unit-test-suite:
runs-on: ubuntu-latest
steps:
- name: Install protoc compiler
shell: bash
run: |
sudo apt-get install -y protobuf-compiler
- name: Checkout Source code
uses: actions/checkout@v3
- name: Cache cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust toolchain
uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v1
- name: Run fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- --no-deps -D warnings
- name: Run tests
run: cargo test --verbose