-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (40 loc) · 1.02 KB
/
rust.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
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
matrix:
os:
- name: Ubuntu
runner: ubuntu-latest
- name: macOS
runner: macOS-latest
- name: Windows
runner: windows-latest
rust: [stable, beta, nightly]
runs-on: ${{ matrix.os.runner }}
name: ${{ matrix.os.name }} - ${{ matrix.rust }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
override: true
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Check code formatting
run: cargo fmt --all -- --check
- name: Check with Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo test --verbose