Skip to content

Commit

Permalink
TST: simplify CI with setup-uv@v5
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Jan 1, 2025
1 parent a984fa0 commit c91bd3d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/bleeding-edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,24 @@ jobs:
with:
python-version: 3.13-dev
- uses: astral-sh/setup-uv@v5

- name: Configure uv
run: |
echo "UV_PYTHON_PREFERENCE=only-system" >> $GITHUB_ENV
echo "UV_PRERELEASE=allow" >> $GITHUB_ENV
echo "UV_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> $GITHUB_ENV
echo "UV_PYTHON=3.13" >> $GITHUB_ENV
- name: Install dependencies
run: |
uv venv
uv pip install --upgrade setuptools wheel
uv pip install --pre --no-build numpy \
--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
uv pip install --pre Cython
uv pip install --no-build setuptools wheel numpy Cython
- name: Build
# --no-build-isolation is used to guarantee that build time dependencies
# are not installed by pip as specified from pyproject.toml, hence we get
# to use the dev version of numpy at build time.
run: |
uv pip install -e . --no-build-isolation
uv pip install --pre pytest
uv pip install pytest
- run: uv pip list

Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,14 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}

- name: Build
run: |
uv venv --python ${{ matrix.python-version }}
uv pip install --editable "." ${{ matrix.install-args }}
- run: uv pip install --requirement test_requirements.txt
- run: uv pip list
- name: Run test suite (UNIX)
if: matrix.os != 'windows-latest'
- name: Run test suite
run: |
source .venv/bin/activate
pytest --color yes -ra
- name: Run test suite (Windows)
if: matrix.os == 'windows-latest'
run: |
source .venv/Scripts/activate
pytest --color yes -ra
5 changes: 1 addition & 4 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,10 @@ jobs:
- uses: astral-sh/setup-uv@v5
- name: Install build time dependencies
run: |
uv venv
uv pip install 'Cython>=3.0' 'numpy>=2.0.0' setuptools wheel check-manifest
- name: Build
run: uv pip install --no-build-isolation .
- run: |
source .venv/bin/activate
check-manifest
- run: check-manifest

deploy:
name: Publish to PyPI
Expand Down

0 comments on commit c91bd3d

Please sign in to comment.