TST: migrate to official astral-sh/setup-uv action #1156
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI (bleeding edge) | |
# this workflow is heavily inspired from pandas, see | |
# https://github.com/pandas-dev/pandas/blob/master/.github/workflows/python-dev.yml | |
# goal: check stability against dev versions of Python, numpy, and matplotlib | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- .github/workflows/bleeding-edge.yaml | |
schedule: | |
# run this every Wednesday at 3 am UTC | |
- cron: 0 3 * * 3 | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
# excluding windows for lack of wheels at the tim of writing | |
runs-on: ${{ matrix.os }} | |
name: Test nightly dependencies | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python Dev Version | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.13-dev | |
- uses: astral-sh/setup-uv@v2 | |
with: | |
enable-cache: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: | | |
uv venv | |
uv pip install --pre --no-build numpy matplotlib \ | |
--extra-index-url \ | |
https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ | |
--index-strategy=unsafe-best-match | |
- name: Build library | |
# forcing bytecode compilation for colorspacious | |
# see https://github.com/astral-sh/uv/issues/4758 | |
run: | | |
uv pip install . | |
uv pip install --compile -r requirements/tests.txt | |
- name: Run test suite | |
run: | | |
source .venv/bin/activate | |
pytest --color yes --mpl-results-path=test_results | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: test_results | |
path: test_results/ |