-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) 路 1.05 KB
/
ci.yaml
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
on: [push, pull_request]
name: Continuous integration
jobs:
check:
name: Check and Lint
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
rust: [stable, nightly]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: Cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --all-targets
- name: Cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
# Update mtime on all our files so that `clippy` rechecks them
- name: Touch source files for clippy recheck
run: find -path ./target -prune -o -name "*.rs" -exec touch {} +
shell: bash
- name: Cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets -- -D warnings