ci: run pre-commit as lint

This reuses the `pre-commit` tool used starting today to avoid code
duplication.
This commit is contained in:
Mikolaj Wielgus 2024-10-06 05:45:29 +02:00
parent 36628d04ae
commit a3f744cce8
1 changed files with 4 additions and 3 deletions

View File

@ -1,13 +1,14 @@
steps:
lint:
pre-commit:
image: rust
environment:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
commands:
- apt-get -y update > /dev/null
- apt-get -y install pre-commit > /dev/null
- rustup default stable
- rustup component add rustfmt clippy
- cargo fmt --check
- cargo clippy
- pre-commit run --all-files
when:
event: [pull_request, push, tag]