-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (32 loc) · 1018 Bytes
/
lint.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
name: Lint
on:
push:
branches-ignore:
- ' '
tags-ignore:
- '*.*.*'
workflow_call:
jobs:
test:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/detect-and-install-rust-toolchain
with:
components: clippy,rustfmt
- name: Cache BuildIt
uses: actions/cache@v3
continue-on-error: true
with:
path: ./buildit/target
key: buildit-lint-${{ runner.os }}-${{ hashFiles('./buildit') }}
restore-keys: buildit-lint-${{ runner.os }}-${{ hashFiles('./buildit') }}
- name: Check code formatting
run: cargo fmt --manifest-path ./buildit/Cargo.toml -- --check
- name: Lint with Clippy
run: cargo clippy --no-deps --all-features
- name: Check code formatting (BuildIt)
run: cargo fmt -- --check
- name: Lint with Clippy (BuildIt)
run: cargo clippy --manifest-path ./buildit/Cargo.toml --all-features