-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (33 loc) · 865 Bytes
/
style.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
name: Style
on:
push:
pull_request:
workflow_dispatch:
jobs:
pre_ci:
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
build:
name: ${{matrix.name || format('Rust {0}', matrix.rust)}}
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
rust: [ stable ]
os: [ ubuntu ]
env:
RUSTFLAGS: --cfg deny_warnings -Dwarnings
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
components: clippy, rustfmt
- name: cargo fmt
run: cargo fmt --all -- --check
- name: cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings