mirror of https://codeberg.org/topola/topola.git
chore(ci): replace running `pre-commit` with just a formatting check
Contrary to what I naively thought, `pre-commit` in CI does not result in commit messages being checked. Another action `pre-commit` was doing was running `cargo check`, but this is essentially the same as building without compilation, and we are testing by building in other CI-workflows. So we are left with only a formatting check, which does not need installing and running `pre-commit`.
This commit is contained in:
parent
1567a9a83e
commit
59478e0dbe
|
|
@ -0,0 +1,11 @@
|
|||
steps:
|
||||
check_formatting:
|
||||
image: rust
|
||||
environment:
|
||||
RUST_BACKTRACE: 1
|
||||
CARGO_TERM_COLOR: always
|
||||
commands:
|
||||
- rustup component add rustfmt
|
||||
- cargo fmt --all -- --check
|
||||
when:
|
||||
event: [pull_request, push, tag]
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
steps:
|
||||
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
|
||||
- pre-commit run --all-files
|
||||
when:
|
||||
event: [pull_request, push, tag]
|
||||
Loading…
Reference in New Issue