-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (51 loc) · 1.35 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
59
60
61
name: ci
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Setup default Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy,rustfmt
- name: Setup problem matchers
uses: r7kamura/rust-problem-matchers@v1
- name: Check formatting
run: cargo fmt --all --verbose -- --check
- name: Run clippy linting
run: cargo clippy --color=never --workspace --verbose --all-targets
env:
RUSTFLAGS:
--warn=clippy::pedantic
validate:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
toolchain:
- stable
- beta
- nightly
continue-on-error: ${{ matrix.toolchain != 'stable' }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Setup problem matchers
uses: r7kamura/rust-problem-matchers@v1
- name: Build and run tests
run: cargo test --color=always --workspace