-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (27 loc) · 1.12 KB
/
_check.yml
File metadata and controls
37 lines (27 loc) · 1.12 KB
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
name: _Check
on:
workflow_call:
jobs:
lint:
name: Clippy & Shear
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install cargo-shear
run: cargo install cargo-shear
# Detects declared but unused dependencies across the whole workspace.
- name: Shear (unused deps)
run: cargo shear
# Host clippy. Wasm crates excluded via default-members. `--no-default-features` disables the producer's `prebuilt` feature so `compiler/build.rs` doesn't try to download the release wasm asset (which doesn't exist yet on the first publish of a new tag).
- name: Clippy (host / tests)
run: cargo clippy --all-targets --no-default-features -- -D warnings
# Lint for wasm target.
- name: Install wasm target
run: rustup target add wasm32-unknown-unknown
- name: Clippy (wasm)
run: cargo clippy --lib --target wasm32-unknown-unknown -p edge-python -p slugify-mod -- -D warnings