Only run cargo when Rust code is changed
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Rafael Caricio 2023-04-27 22:13:05 +02:00
parent a2bc297f0e
commit 5d0b03c2a3
Signed by: rafaelcaricio
GPG key ID: 3C86DBCE8E93C947

View file

@ -2,9 +2,29 @@ matrix:
RUST: [stable]
pipeline:
test:
check-style:
image: rust
environment: [CARGO_TERM_COLOR=always]
when:
branch: [ master ]
path:
include:
- src/**/*.rs
- fedimovies-*/**/*.rs
commands:
- rustup default $RUST
- cargo check
- cargo clippy --all-targets --all-features -- -D warnings
run-tests:
image: rust
when:
branch: [ master ]
path:
include:
- src/**/*.rs
- fedimovies-*/**/*.rs
environment:
- CARGO_TERM_COLOR=always
commands:
- rustup default $RUST
- cargo test --all -- --nocapture