mirror of https://codeberg.org/topola/topola.git
ci: run pre-commit as lint
This reuses the `pre-commit` tool used starting today to avoid code duplication.
This commit is contained in:
parent
36628d04ae
commit
a3f744cce8
|
|
@ -1,13 +1,14 @@
|
||||||
steps:
|
steps:
|
||||||
lint:
|
pre-commit:
|
||||||
image: rust
|
image: rust
|
||||||
environment:
|
environment:
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
commands:
|
commands:
|
||||||
|
- apt-get -y update > /dev/null
|
||||||
|
- apt-get -y install pre-commit > /dev/null
|
||||||
- rustup default stable
|
- rustup default stable
|
||||||
- rustup component add rustfmt clippy
|
- rustup component add rustfmt clippy
|
||||||
- cargo fmt --check
|
- pre-commit run --all-files
|
||||||
- cargo clippy
|
|
||||||
when:
|
when:
|
||||||
event: [pull_request, push, tag]
|
event: [pull_request, push, tag]
|
||||||
Loading…
Reference in New Issue