From cee521be5b62f04b2ca6375df3930e90e5db23ce Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Thu, 9 Jan 2025 14:16:49 +0100 Subject: [PATCH] chore(ci): run tests as step after building CLI instead of separate flow This will reduce our CI usage by building Topola one time less. This is needed because it turned out that we are straining the CI and were asked to reduce our footprint: https://codeberg.org/topola/topola/issues/155 --- ...uild_cli.yaml => build_cli_then_test.yaml} | 11 ++++++++++ .woodpecker/test.yaml | 22 ------------------- 2 files changed, 11 insertions(+), 22 deletions(-) rename .woodpecker/{build_cli.yaml => build_cli_then_test.yaml} (56%) delete mode 100644 .woodpecker/test.yaml diff --git a/.woodpecker/build_cli.yaml b/.woodpecker/build_cli_then_test.yaml similarity index 56% rename from .woodpecker/build_cli.yaml rename to .woodpecker/build_cli_then_test.yaml index a670f35..aca53f1 100644 --- a/.woodpecker/build_cli.yaml +++ b/.woodpecker/build_cli_then_test.yaml @@ -20,3 +20,14 @@ steps: - cargo build -p topola-cli --no-default-features --features "$FEATURES" -- when: event: [pull_request, push, tag] + + # Testing is a step instead of a separate flow to reduce Codeberg's CI usage. + test: + image: rust + environment: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + commands: + # Only run tests for stable channel to avoid straining Codeberg's CI. + - test "$CHANNEL" = "stable" + - cargo test --verbose --no-default-features --features "$FEATURES" diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml deleted file mode 100644 index 9be6c50..0000000 --- a/.woodpecker/test.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Topola contributors -# -# SPDX-License-Identifier: MIT - -matrix: - include: - - CHANNEL: stable - FEATURES: disable_contracts - #- CHANNEL: nightly - #FEATURES: - -steps: - test: - image: rust - environment: - RUST_BACKTRACE: 1 - CARGO_TERM_COLOR: always - commands: - - rustup default "$CHANNEL" - - cargo test --verbose --no-default-features --features "$FEATURES" - when: - event: [pull_request, push, tag]