servo/.github/workflows/lint.yml
sagudev cf866d12b4
chore: Pin cargo-deny to 0.18.3 (#38681)
cargo-deny@0.18.4 requires Rust 1.88

Testing: Fixes CI.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-08-14 12:15:15 +00:00

50 lines
1.5 KiB
YAML

name: Lint
on:
workflow_call:
workflow_dispatch:
env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
CARGO_INCREMENTAL: 0
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
if: github.event_name != 'pull_request_target'
with:
fetch-depth: 2 # This is necessary for `test-tidy`.
# This is necessary to checkout the pull request if this run was triggered via a
# `pull_request_target` event.
- uses: actions/checkout@v4
if: github.event_name == 'pull_request_target'
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 2 # This is necessary for `test-tidy`.
- name: Set LIBCLANG_PATH env # needed for bindgen in mozangle
run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Install taplo
uses: baptiste0928/cargo-install@v3
with:
crate: taplo-cli
locked: true
- name: Install cargo-deny
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-deny
version: 0.18.3
locked: true
- name: Bootstrap dependencies
run: |
sudo apt update
./mach bootstrap
- name: Clippy
run: |
./mach clippy --use-crown --locked --github-annotations -- -- --deny warnings
- name: Tidy
run: ./mach test-tidy --no-progress --all --github-annotations