mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-25 14:51:15 -03:00
Run rustfmt and clippy in CI (#9616)
* Add machine-readable MSRV to Cargo.toml * Fix clippy warnings * CI: add rustfmt and clippy checks
This commit is contained in:
42
.github/workflows/rust_checks.yml
vendored
Normal file
42
.github/workflows/rust_checks.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Rust checks
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
rustfmt:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: SetupRust
|
||||
uses: ATiltedTree/setup-rust@v1
|
||||
with:
|
||||
rust-version: stable
|
||||
- name: cargo fmt
|
||||
run: |
|
||||
cd fish-rust
|
||||
cargo fmt --check --all
|
||||
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: SetupRust
|
||||
uses: ATiltedTree/setup-rust@v1
|
||||
with:
|
||||
rust-version: stable
|
||||
- name: Install deps
|
||||
run: |
|
||||
sudo apt install gettext libncurses5-dev libpcre2-dev python3-pip tmux
|
||||
sudo pip3 install pexpect
|
||||
- name: cmake
|
||||
run: |
|
||||
cmake -B build
|
||||
- name: cargo clippy
|
||||
run: |
|
||||
cd fish-rust
|
||||
cargo clippy --workspace --all-targets -- --deny=warnings
|
||||
Reference in New Issue
Block a user