-
Notifications
You must be signed in to change notification settings - Fork 20
39 lines (37 loc) · 900 Bytes
/
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
name: Rust
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: true
matrix:
rustup:
- toolchain: stable
components: "clippy, rustfmt"
- toolchain: nightly
components: ""
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
name: Install Rust
with:
toolchain: ${{ matrix.rustup.toolchain }}
profile: minimal
components: ${{ matrix.rustup.components }}
default: true
- name: Clippy
run: cargo clippy
if: contains(matrix.rustup.components, 'clippy')
- name: Format
run: cargo fmt -- --check
if: contains(matrix.rustup.components, 'rustfmt')
- name: Test
run: cargo test