ci: Run clippy check
This commit is contained in:
parent
c5db43ba9a
commit
e31d261e66
1 changed files with 32 additions and 7 deletions
|
@ -1,16 +1,13 @@
|
||||||
name: Rust Formatting
|
name: Rust Formatting
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
format:
|
||||||
name: Format
|
name: Format
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
SCCACHE_GHA_ENABLED: "true"
|
|
||||||
RUSTC_WRAPPER: "sccache"
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
@ -24,6 +21,23 @@ jobs:
|
||||||
toolchain: "nightly"
|
toolchain: "nightly"
|
||||||
components: "rustfmt"
|
components: "rustfmt"
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: |
|
||||||
|
cargo +nightly fmt --all -- --check
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
name: Clippy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Install rust
|
||||||
|
uses: ./.forgejo/actions/rust-toolchain
|
||||||
|
|
||||||
- uses: https://github.com/actions/create-github-app-token@v2
|
- uses: https://github.com/actions/create-github-app-token@v2
|
||||||
id: app-token
|
id: app-token
|
||||||
with:
|
with:
|
||||||
|
@ -36,9 +50,20 @@ jobs:
|
||||||
uses: ./.forgejo/actions/sccache
|
uses: ./.forgejo/actions/sccache
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.app-token.outputs.token }}
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
- run: sudo apt-get update
|
||||||
|
- name: Install system dependencies
|
||||||
|
uses: https://github.com/awalsh128/cache-apt-pkgs-action@v1
|
||||||
|
with:
|
||||||
|
packages: clang liburing-dev
|
||||||
|
version: 1
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: |
|
run: |
|
||||||
cargo +nightly fmt --all -- --check
|
cargo clippy \
|
||||||
|
--workspace \
|
||||||
|
--locked \
|
||||||
|
--profile test \
|
||||||
|
-- \
|
||||||
|
-D warnings
|
||||||
|
|
||||||
- name: Show sccache stats
|
- name: Show sccache stats
|
||||||
run: sccache --show-stats
|
run: sccache --show-stats
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue