Skip to content

Commit

Permalink
CI: downloads test assets before executing tests (#7874)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf authored Oct 23, 2024
1 parent 213aa1d commit c63bbea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/reusable_checks_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions scripts/ci/rust_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit c63bbea

Please sign in to comment.