From bd698027be297c7503ccebdd1687b1f4a31d3a0a Mon Sep 17 00:00:00 2001 From: Ellen Emilia Anna Zscheile Date: Thu, 9 Jan 2025 15:12:59 +0100 Subject: [PATCH] ci: only run CI when relevant files changed --- .woodpecker/build_cli_then_test.yaml | 32 ++++++++++++++++++++++++++++ .woodpecker/build_egui.yaml | 15 +++++++++++++ .woodpecker/build_wasm.yaml | 15 +++++++++++++ .woodpecker/check_formatting.yaml | 15 +++++++++++++ 4 files changed, 77 insertions(+) diff --git a/.woodpecker/build_cli_then_test.yaml b/.woodpecker/build_cli_then_test.yaml index aca53f1..e3da18c 100644 --- a/.woodpecker/build_cli_then_test.yaml +++ b/.woodpecker/build_cli_then_test.yaml @@ -20,6 +20,21 @@ steps: - cargo build -p topola-cli --no-default-features --features "$FEATURES" -- when: event: [pull_request, push, tag] + path: + include: + - '.woodpecker/*.yaml' + - '*.toml' + - 'crates/**' + - 'src/**' + - 'tests/**' + - 'examples/**' + exclude: + - 'assets/**' + - 'LICENSES/**' + - 'locales/**' + - '*.md' + ignore_message: '[ALL]' + on_empty: false # Testing is a step instead of a separate flow to reduce Codeberg's CI usage. test: @@ -31,3 +46,20 @@ steps: # Only run tests for stable channel to avoid straining Codeberg's CI. - test "$CHANNEL" = "stable" - cargo test --verbose --no-default-features --features "$FEATURES" + when: + event: [pull_request, push, tag] + path: + include: + - '.woodpecker/*.yaml' + - '*.toml' + - 'crates/**' + - 'src/**' + - 'tests/**' + - 'examples/**' + exclude: + - 'assets/**' + - 'LICENSES/**' + - 'locales/**' + - '*.md' + ignore_message: '[ALL]' + on_empty: false diff --git a/.woodpecker/build_egui.yaml b/.woodpecker/build_egui.yaml index af38f9f..89da3fa 100644 --- a/.woodpecker/build_egui.yaml +++ b/.woodpecker/build_egui.yaml @@ -20,3 +20,18 @@ steps: - cargo build -p topola-egui --no-default-features --features "$FEATURES" when: event: [pull_request, push, tag] + path: + include: + - '.woodpecker/*.yaml' + - '*.toml' + - 'crates/**' + - 'src/**' + - 'tests/**' + - 'examples/**' + exclude: + - 'assets/**' + - 'LICENSES/**' + - 'locales/**' + - '*.md' + ignore_message: '[ALL]' + on_empty: false diff --git a/.woodpecker/build_wasm.yaml b/.woodpecker/build_wasm.yaml index f6e92bd..19d989a 100644 --- a/.woodpecker/build_wasm.yaml +++ b/.woodpecker/build_wasm.yaml @@ -24,3 +24,18 @@ steps: - trunk build when: event: [pull_request, push, tag] + path: + include: + - '.woodpecker/*.yaml' + - '*.toml' + - 'crates/**' + - 'src/**' + - 'tests/**' + - 'examples/**' + exclude: + - 'assets/**' + - 'LICENSES/**' + - 'locales/**' + - '*.md' + ignore_message: '[ALL]' + on_empty: false diff --git a/.woodpecker/check_formatting.yaml b/.woodpecker/check_formatting.yaml index ae15e67..b869124 100644 --- a/.woodpecker/check_formatting.yaml +++ b/.woodpecker/check_formatting.yaml @@ -13,3 +13,18 @@ steps: - cargo fmt --all -- --check when: event: [pull_request, push, tag] + path: + include: + - '.woodpecker/*.yaml' + - '*.toml' + - 'crates/**' + - 'src/**' + - 'tests/**' + - 'examples/**' + exclude: + - 'assets/**' + - 'LICENSES/**' + - 'locales/**' + - '*.md' + ignore_message: '[ALL]' + on_empty: false