From 569c63827bac03ccdb121580187df4ca87af5565 Mon Sep 17 00:00:00 2001 From: j178 <10510431+j178@users.noreply.github.com> Date: Sat, 23 Nov 2024 19:31:36 +0800 Subject: [PATCH] Make uv tests on Windows run sequentially --- .config/nextest.toml | 10 ++++++++++ .github/workflows/ci.yml | 7 ++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 .config/nextest.toml diff --git a/.config/nextest.toml b/.config/nextest.toml new file mode 100644 index 0000000..3f3e881 --- /dev/null +++ b/.config/nextest.toml @@ -0,0 +1,10 @@ +[test-groups] +uv = { max-threads = 1} + +# On Windows, concurrent uv runs may fail by `Access Denied` errors +# due to concurrent uv cache writes. +# Configure these tests to run sequentially. +[[profile.default.overrides]] +filter = 'test(/^(run::run_basic)|(run::local_need_install)$/)' +platform = 'cfg(windows)' +test-group = 'uv' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 490aec9..7dee663 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,6 +103,7 @@ jobs: - name: "Cargo test" run: | + cargo nextest show-config test-groups cargo nextest run \ --workspace \ --status-level skip --failure-output immediate --no-fail-fast -j 8 --final-status-level slow @@ -131,6 +132,7 @@ jobs: - name: "Cargo test" run: | + cargo nextest show-config test-groups cargo nextest run \ --workspace \ --status-level skip --failure-output immediate --no-fail-fast -j 8 --final-status-level slow @@ -171,6 +173,5 @@ jobs: - name: "Cargo test" working-directory: ${{ env.PRE_COMMIT_WORKSPACE }} run: | - # use only 1 job for now - # uv concurrently writes to cache, which causes `Access is denied` errors - cargo nextest run --workspace --status-level skip --failure-output immediate --no-fail-fast -j 1 --final-status-level slow + cargo nextest show-config test-groups + cargo nextest run --workspace --status-level skip --failure-output immediate --no-fail-fast -j 8 --final-status-level slow