Skip to content

Commit efe9dda

Browse files
authored
Create rust-nightly-lint-fmt.yml
1 parent 88b3a10 commit efe9dda

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Rust nightly lint & style check
2+
3+
on:
4+
push:
5+
branches: [ '**-nightly' ]
6+
paths:
7+
- '.github/workflows/rust-nightly-lint-fmt.yml'
8+
- '**/*.rs'
9+
- '**/clippy.toml'
10+
- '**/.clippy.toml'
11+
- '**/rustfmt.toml'
12+
- '**/.rustfmt.toml'
13+
pull_request:
14+
branches: [ '**-nightly' ]
15+
paths:
16+
- '.github/workflows/rust-nightly-lint-fmt.yml'
17+
- '**/*.rs'
18+
- '**/clippy.toml'
19+
- '**/.clippy.toml'
20+
- '**/rustfmt.toml'
21+
- '**/.rustfmt.toml'
22+
23+
env:
24+
CARGO_TERM_COLOR: always
25+
26+
jobs:
27+
lint:
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 5
30+
steps:
31+
- uses: actions/checkout@v2
32+
- uses: actions-rs/toolchain@v1
33+
with:
34+
toolchain: nightly
35+
override: true
36+
components: rustfmt, clippy
37+
- uses: actions-rs/clippy-check@v1
38+
with:
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
args: --all-features
41+
- name: Run lint
42+
run: cargo clippy --verbose -- -D warnings
43+
- name: Run fmt
44+
run: cargo fmt --verbose --all -- --check

0 commit comments

Comments
 (0)