-
Notifications
You must be signed in to change notification settings - Fork 77
45 lines (38 loc) · 1.16 KB
/
lint.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
40
41
42
43
44
45
name: Lint
on: [pull_request]
jobs:
test:
name: lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: taiki-e/install-action@v2
with:
tool: cargo-hack@0.6.21
- name: Run Lint
run: |
cargo hack clippy --each-feature --exclude-features ic_ref_tests --no-dev-deps --verbose -- -D warnings
cargo clippy --features ic_ref_tests --verbose --tests --benches -- -D warnings
env:
RUST_BACKTRACE: 1
- name: Run Lint (WASM)
run: CARGO_TARGET_DIR=target/wasm cargo clippy --target wasm32-unknown-unknown -p ic-agent --features wasm-bindgen -p ic-utils --verbose -- -D warnings
aggregate:
name: lint:required
runs-on: ubuntu-latest
if: ${{ always() }}
needs: test
steps:
- name: Check lint result
if: ${{ needs.test.result != 'success' }}
run: exit 1