-
Notifications
You must be signed in to change notification settings - Fork 17
59 lines (51 loc) · 2 KB
/
lint.yml
File metadata and controls
59 lines (51 loc) · 2 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Lint
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: read
jobs:
lint:
# If the workflow was triggered by anything other than a pull_request event
# (e.g., push, workflow_dispatch, schedule, pull_request_target),
# github.event_name != 'pull_request' is true.
# github.event.pull_request is only populated on pull_request events.
# It is true when the PR is not a draft (i.e., “Ready for review”).
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Format
run: |
cargo fmt --check --all --manifest-path src/wasmtime/Cargo.toml
cargo fmt --check --all --manifest-path src/lind-boot/Cargo.toml
# Using rust nightly, invalidates cache every day
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
- name: Switch to Rust nightly
run: |
# Pin to last working nightly version (see #242)
rustup default nightly-2025-06-08
rustup component add clippy
- name: Clippy
run: |
# Run clippy over lind-boot and its dependencies
# See `cargo clippy` and `cargo check` for available options
cargo clippy \
--manifest-path src/lind-boot/Cargo.toml \
--all-features \
--keep-going \
-- \
-A warnings \
-A clippy::not_unsafe_ptr_arg_deref \
-A clippy::absurd_extreme_comparisons
# - name: Install Zizmor via Cargo
# run: cargo install zizmor --version 1.15.2
# - name: Run Zizmor
# env:
# GH_TOKEN: ${{ github.token }}
# run: zizmor -v .github/workflows #Running with -v to show all passes, will halt if any fail