From 5d0b03c2a3b830b94315c68b4db4e75fb73525e4 Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Thu, 27 Apr 2023 22:13:05 +0200 Subject: [PATCH] Only run cargo when Rust code is changed --- .woodpecker.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 07d759a..41a221a 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -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