From 249279922685b47f5be34fd85af584faae6b3839 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Wed, 23 Oct 2024 10:25:35 +0200 Subject: [PATCH] rust checks downloads test assets now before executing tests --- .github/workflows/reusable_checks_rust.yml | 3 +++ scripts/ci/rust_checks.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/reusable_checks_rust.yml b/.github/workflows/reusable_checks_rust.yml index db1b60173f60..42c0fcef87c5 100644 --- a/.github/workflows/reusable_checks_rust.yml +++ b/.github/workflows/reusable_checks_rust.yml @@ -105,5 +105,8 @@ jobs: with: pixi-version: v0.25.0 + - name: Download test assets + run: pixi run python ./scripts/ci/download_test_assets.py + - name: pixi run cargo test --all-targets --all-features run: pixi run cargo test --all-targets --all-features diff --git a/scripts/ci/rust_checks.py b/scripts/ci/rust_checks.py index 49e4b169937e..7508adf91726 100755 --- a/scripts/ci/rust_checks.py +++ b/scripts/ci/rust_checks.py @@ -221,6 +221,10 @@ def docs_slow(timings: list[Timing]) -> None: def tests(timings: list[Timing]) -> None: # We first use `--no-run` to measure the time of compiling vs actually running + # Make sure we have the test assets first. + print("Downloading test assets…") + subprocess.run([sys.executable, "tests/assets/download_test_assets.py"]) + # Just a normal `cargo test` should always work: timings.append(run_cargo("test", "--all-targets --no-run")) timings.append(run_cargo("test", "--all-targets"))