-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (56 loc) · 1.48 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
48
49
50
51
52
53
54
55
56
57
58
name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
checks:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: clippy, rustfmt
override: true
- run: cargo clean
- run: cargo fmt -- --check
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
build:
needs: checks
runs-on: ${{ matrix.operating-system }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
fail-fast: true
matrix:
operating-system: [ ubuntu-20.04, ubuntu-18.04, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: cargo test --all-features --verbose
coverage:
needs: build
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
env:
CARGO_MAKE_RUN_CODECOV: true
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: davidB/rust-cargo-make@v1
- run: cargo make ci-flow