From 183fe403c66831c0bb0d4e5ade21e570410728f8 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 22 Jan 2025 16:39:04 -0500 Subject: [PATCH] Disable `.egg-info` tests via `slow-tests` feature on Windows and macOS (#10872) ## Summary These are super slow on Windows and it's not critical to test them on that platform. Let's just do the lazy thing. --- .github/workflows/ci.yml | 10 ++++++++-- crates/uv/Cargo.toml | 4 +++- crates/uv/tests/it/pip_install.rs | 1 + crates/uv/tests/it/sync.rs | 1 + 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4af9f426c..c21778157 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -228,7 +228,8 @@ jobs: - name: "Cargo test" run: | cargo nextest run \ - --features python-patch \ + --no-default-features \ + --features python,python-managed,pypi,git,performance,crates-io \ --workspace \ --status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow @@ -272,8 +273,13 @@ jobs: # Avoid permission errors during concurrent tests # See https://github.com/astral-sh/uv/issues/6940 UV_LINK_MODE: copy + shell: bash run: | - cargo nextest run --no-default-features --features python,pypi,python-managed --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow + cargo nextest run \ + --no-default-features \ + --features python,pypi,python-managed \ + --workspace \ + --status-level skip --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow # Separate jobs for the nightly crate windows-trampoline-check: diff --git a/crates/uv/Cargo.toml b/crates/uv/Cargo.toml index 9d0ee8b37..1c53ea2c8 100644 --- a/crates/uv/Cargo.toml +++ b/crates/uv/Cargo.toml @@ -133,7 +133,7 @@ ignored = [ ] [features] -default = ["python", "python-managed", "pypi", "git", "performance", "crates-io", "test-ecosystem"] +default = ["python", "python-managed", "pypi", "git", "performance", "crates-io", "slow-tests", "test-ecosystem"] # Use better memory allocators, etc. performance = [ "performance-memory-allocator", @@ -156,6 +156,8 @@ pypi = [] git = [] # Introduces a dependency on crates.io. crates-io = [] +# Include "slow" test cases. +slow-tests = [] # Includes test cases that require ecosystem packages test-ecosystem = [] # Adds self-update functionality. diff --git a/crates/uv/tests/it/pip_install.rs b/crates/uv/tests/it/pip_install.rs index 30eb11c39..f6245a0cc 100644 --- a/crates/uv/tests/it/pip_install.rs +++ b/crates/uv/tests/it/pip_install.rs @@ -7675,6 +7675,7 @@ fn switch_platform() -> Result<()> { /// See: #[test] +#[cfg(feature = "slow-tests")] fn stale_egg_info() -> Result<()> { let context = TestContext::new("3.12"); diff --git a/crates/uv/tests/it/sync.rs b/crates/uv/tests/it/sync.rs index 46ab4cf5f..9ee7cb238 100644 --- a/crates/uv/tests/it/sync.rs +++ b/crates/uv/tests/it/sync.rs @@ -5276,6 +5276,7 @@ fn sync_derivation_chain_group() -> Result<()> { /// See: #[test] +#[cfg(feature = "slow-tests")] fn sync_stale_egg_info() -> Result<()> { let context = TestContext::new("3.13");