| 1 |
name: Lint |
| 2 |
|
| 3 |
on: |
| 4 |
pull_request: |
| 5 |
types: [opened, synchronize, reopened, ready_for_review] |
| 6 |
|
| 7 |
permissions: |
| 8 |
contents: read |
| 9 |
|
| 10 |
concurrency: |
| 11 |
group: ${{ github.workflow }}-${{ github.ref }} |
| 12 |
cancel-in-progress: true |
| 13 |
|
| 14 |
jobs: |
| 15 |
clippy: |
| 16 |
runs-on: ubuntu-latest |
| 17 |
|
| 18 |
permissions: |
| 19 |
contents: read |
| 20 |
checks: write |
| 21 |
|
| 22 |
steps: |
| 23 |
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 24 |
|
| 25 |
- name: Install Rust |
| 26 |
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 |
| 27 |
with: |
| 28 |
components: clippy |
| 29 |
|
| 30 |
- name: Install just, cargo-hack |
| 31 |
uses: taiki-e/install-action@065d6a08a14e61e89fb0a4c10eecdbdef39c7d8e # v2.85.4 |
| 32 |
with: |
| 33 |
tool: just,cargo-hack |
| 34 |
|
| 35 |
- name: Check with Clippy |
| 36 |
run: just clippy |
| 37 |
|
| 38 |
rustfmt: |
| 39 |
runs-on: ubuntu-latest |
| 40 |
steps: |
| 41 |
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 42 |
|
| 43 |
- name: Install Rust (nightly) |
| 44 |
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 |
| 45 |
with: |
| 46 |
toolchain: nightly |
| 47 |
components: rustfmt |
| 48 |
|
| 49 |
- name: Check with Rustfmt |
| 50 |
run: cargo fmt -- --check |
| 51 |
|
| 52 |
docs: |
| 53 |
runs-on: ubuntu-latest |
| 54 |
steps: |
| 55 |
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 56 |
|
| 57 |
- name: Install Rust (nightly) |
| 58 |
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 |
| 59 |
with: |
| 60 |
toolchain: nightly |
| 61 |
components: rust-docs |
| 62 |
|
| 63 |
- name: Check for broken intra-doc links |
| 64 |
env: |
| 65 |
RUSTDOCFLAGS: -D warnings |
| 66 |
run: cargo doc --workspace --no-deps --all-features |
| 67 |
|
| 68 |
sorted-deps: |
| 69 |
runs-on: ubuntu-latest |
| 70 |
steps: |
| 71 |
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 72 |
|
| 73 |
- name: Install Rust |
| 74 |
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 |
| 75 |
with: |
| 76 |
components: clippy |
| 77 |
|
| 78 |
- name: Install just, cargo-sort |
| 79 |
uses: taiki-e/install-action@065d6a08a14e61e89fb0a4c10eecdbdef39c7d8e # v2.85.4 |
| 80 |
with: |
| 81 |
tool: just,cargo-sort |
| 82 |
|
| 83 |
- name: Check dependency requirements are sorted lexicographically |
| 84 |
run: cargo sort --workspace --check |