-
Notifications
You must be signed in to change notification settings - Fork 4
82 lines (76 loc) · 2.07 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
on:
push:
branches:
- 'master'
- 'release/*'
pull_request:
branches:
- 'master'
- 'release/*'
name: CI
jobs:
build_test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- version: stable
- version: 1.56.0 # MSRV
msrv: true
features:
- --no-default-features
- --features default
steps:
- name: checkout
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust.version }}
override: true
profile: minimal
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Install libpcsclite-dev
run: sudo apt install libpcsclite-dev
- name: Use MSRV Cargo.toml # Don't include "cli" in workspace if using MSRV
if: ${{ matrix.rust.msrv }}
run: cp Cargo.toml.MSRV Cargo.toml
- name: Build
run: cargo build ${{ matrix.features }}
- name: Test
run: cargo test ${{ matrix.features }}
rust_fmt:
name: Rust fmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- name: Check fmt
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check
clippy_check:
name: Clippy check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Install libpcsclite-dev
run: sudo apt install libpcsclite-dev
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings