From 4ddc3cf93fe04ffbbb3bf628e6b855e517b7a89e Mon Sep 17 00:00:00 2001 From: Jo <10510431+j178@users.noreply.github.com> Date: Sat, 23 Nov 2024 19:46:15 +0800 Subject: [PATCH] Make uv tests on Windows run sequentially (#104) * Make uv tests on Windows run sequentially * Fix --- .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..9f515aa --- /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_basic) | test(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