-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (59 loc) · 1.54 KB
/
main.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
name: CI
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
rust: [stable, beta, nightly]
steps:
- uses: actions/checkout@master
- name: Build & Test
if: ${{ !cancelled() }}
run: |
rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
cargo test
- name: Abort on error
if: ${{ failure() }}
run: echo "Some of jobs failed" && false
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Rustfmt Check
run: |
rustup update stable && rustup default stable && rustup component add rustfmt
cargo fmt -- --check
clippy_check:
name: Clippy Check & Build
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features -- -D warnings
- uses: actions-rs/cargo@v1
with:
command: build
args: --examples --all-features
semver:
name: Check semver
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: obi1kenobi/cargo-semver-checks-action@v2