mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Run Windows tests with a subset of features (#3040)
Separates Windows tests from the rest because it's a pain and drops the `python-patch` feature from testing so we can use the GitHub Actions Python versions which bootstrap in 0 seconds instead of 2 minutes.
This commit is contained in:
parent
66e420f34b
commit
52472cef6e
1 changed files with 49 additions and 11 deletions
60
.github/workflows/ci.yml
vendored
60
.github/workflows/ci.yml
vendored
|
@ -60,16 +60,17 @@ jobs:
|
|||
- name: "Clippy"
|
||||
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
|
||||
|
||||
cargo-test:
|
||||
cargo-test-unix:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
# We use the large GitHub actions runners
|
||||
# For Ubuntu and Windows, this requires Organization-level configuration
|
||||
# See: https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/about-larger-runners#about-ubuntu-and-windows-larger-runners
|
||||
- { os: "ubuntu", runner: "ubuntu-latest-large" }
|
||||
- { os: "windows", runner: "windows-latest-large" }
|
||||
- { os: "macos", runner: "macos-14" }
|
||||
- os: "ubuntu"
|
||||
runner: "ubuntu-latest-large"
|
||||
- os: "macos"
|
||||
runner: "macos-14"
|
||||
fail-fast: false
|
||||
runs-on:
|
||||
labels: ${{ matrix.runner }}
|
||||
|
@ -79,8 +80,7 @@ jobs:
|
|||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
|
||||
- if: ${{ matrix.os != 'windows' }}
|
||||
uses: rui314/setup-mold@v1
|
||||
- uses: rui314/setup-mold@v1
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
|
@ -95,17 +95,55 @@ jobs:
|
|||
|
||||
- name: "Cargo test"
|
||||
run: |
|
||||
cargo nextest run --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow
|
||||
cargo nextest run \
|
||||
--workspace \
|
||||
--status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow
|
||||
|
||||
- name: "Smoke test (unix)"
|
||||
if: ${{ matrix.os != 'windows' }}
|
||||
- name: "Smoke test"
|
||||
run: |
|
||||
uv="./target/debug/uv"
|
||||
$uv venv
|
||||
$uv pip install ruff
|
||||
|
||||
- name: "Smoke test (windows)"
|
||||
if: ${{ matrix.os == 'windows' }}
|
||||
cargo-test-windows:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: "windows"
|
||||
runner: "windows-latest-large"
|
||||
fail-fast: false
|
||||
runs-on:
|
||||
labels: ${{ matrix.runner }}
|
||||
name: "cargo test | ${{ matrix.os }}"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
|
||||
# We do not test with Python patch versions on Windows
|
||||
# so we can use `setup-python` instead of our bootstrapping code
|
||||
# this is much faster on the extremely slow GitHub Windows runners.
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: |
|
||||
3.8
|
||||
3.9
|
||||
3.10
|
||||
3.11
|
||||
3.12
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: "Install cargo nextest"
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-nextest
|
||||
|
||||
- name: "Cargo test"
|
||||
run: |
|
||||
cargo nextest run --no-default-features --features python,pypi,git --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow
|
||||
|
||||
- name: "Smoke test"
|
||||
run: |
|
||||
Set-Alias -Name uv -Value ./target/debug/uv
|
||||
uv venv
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue