-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (39 loc) · 1.08 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
name: Run tests
on:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Git repository
uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.80.0
default: true
components: rustfmt, clippy
- name: Check Rust formatting
run: cargo fmt -- --check
- name: lint with clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: |
--all-targets --
-W clippy::wildcard_imports
-W clippy::redundant_closure_for_method_calls
-W clippy::enum_glob_use
-A clippy::float_cmp
-D clippy::unused_io_amount
-W future_incompatible
-W nonstandard_style
-W rust_2018_compatibility
-W rust_2021_compatibility
-W unused
- name: Build
run: cargo build --release
- name: Unit tests
run: cargo test --release -- --nocapture