-
Notifications
You must be signed in to change notification settings - Fork 20
47 lines (41 loc) · 1.18 KB
/
ci.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
name: CI
on: [ push, pull_request ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
rust: [ stable, nightly ]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
id: toolchain
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: clippy
if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: cache cargo binaries
id: cache
uses: actions/cache@v2
with:
path: "/usr/share/rust/.cargo"
key: ${{ runner.os }}-cargo-bins-${{ env.GITHUB_SHA }}
restore-keys: ${{ runner.os }}-cargo-bins-
- name: install tools
if: steps.cache.outputs.cache_hit != 'true'
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-all-features
- name: Run Tests
uses: actions-rs/cargo@v1
with:
command: test-all-features