Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: test minimum stated dependencies on CI with uv --resolution lowest-direct #109

Merged
merged 54 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d9d6fca
build: restrict qt a bit more
tlambert03 Jan 18, 2025
a855797
pin windows, add back iconify
tlambert03 Jan 18, 2025
bad43f4
ci: use setup-uv
tlambert03 Jan 18, 2025
9aa20dd
Merge branch 'main' into uv-tests
tlambert03 Jan 18, 2025
6612eb6
might as well use uv run
tlambert03 Jan 18, 2025
3b8319f
omit tests from min reqs
tlambert03 Jan 18, 2025
c04ebc2
add ignore warning
tlambert03 Jan 18, 2025
624a284
only binary for numpy
tlambert03 Jan 18, 2025
a7a6562
more pins
tlambert03 Jan 18, 2025
af96730
test: ignore warnings on older versions
tlambert03 Jan 18, 2025
25e65cb
comments
tlambert03 Jan 18, 2025
3321b47
update min pin for 3.12
tlambert03 Jan 18, 2025
7603bb1
refine pyqt pins
tlambert03 Jan 18, 2025
a549463
refine pyside6 pins
tlambert03 Jan 18, 2025
f44163c
only binary for wx
tlambert03 Jan 18, 2025
a87acc0
Merge branch 'main' into uv-tests
tlambert03 Jan 22, 2025
1cf4654
Merge branch 'main' into uv-tests
tlambert03 Feb 4, 2025
b3edc94
update deps
tlambert03 Feb 4, 2025
8b07eef
update lock
tlambert03 Feb 4, 2025
5ea9af5
verbose again
tlambert03 Feb 5, 2025
22a891f
sync0
tlambert03 Feb 5, 2025
13fc410
nosync
tlambert03 Feb 5, 2025
0ac39bb
Merge branch 'main' into uv-tests
tlambert03 Feb 5, 2025
4714d84
fix pyproject
tlambert03 Feb 5, 2025
6802a47
fix usage of numpy
tlambert03 Feb 5, 2025
1d4d551
continue on minreq
tlambert03 Feb 5, 2025
422bfbc
bump ipywidgets min
tlambert03 Feb 5, 2025
59eb1d7
fix docs
tlambert03 Feb 6, 2025
bd03092
add CONTRIB docs
tlambert03 Feb 6, 2025
4e918ab
change min pyside
tlambert03 Feb 6, 2025
c1f5d94
try make
tlambert03 Feb 6, 2025
198216e
fix cov
tlambert03 Feb 6, 2025
304ca41
try reduce matrix
tlambert03 Feb 6, 2025
8299093
combine coverage
tlambert03 Feb 6, 2025
db2c805
change name
tlambert03 Feb 6, 2025
56a5fcd
go back to separate
tlambert03 Feb 6, 2025
7f451e8
add retries
tlambert03 Feb 8, 2025
e6ec3de
merge cov
tlambert03 Feb 8, 2025
a47820c
add another try
tlambert03 Feb 8, 2025
18b32cd
Merge branch 'main' into uv-tests
tlambert03 Feb 8, 2025
264e1fd
update lockfile
tlambert03 Feb 8, 2025
fd100c2
skip examples on windows
tlambert03 Feb 8, 2025
79b94c5
omit wxpython from dev
tlambert03 Feb 8, 2025
1b7f33f
try to configure curl
tlambert03 Feb 8, 2025
6ec20f0
use quotes
tlambert03 Feb 8, 2025
1989ace
add verbose
tlambert03 Feb 8, 2025
c0aa36c
rename
tlambert03 Feb 8, 2025
1738f8c
remove unnecessary cov
tlambert03 Feb 8, 2025
65ea40a
test array libs
tlambert03 Feb 8, 2025
eef50c1
use quotes
tlambert03 Feb 8, 2025
4eca437
quites
tlambert03 Feb 8, 2025
7504c35
whoops add back make
tlambert03 Feb 8, 2025
191c027
add lavapipe
tlambert03 Feb 8, 2025
ffa1b58
remove run_id from covreport name
tlambert03 Feb 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 103 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
tags: [v*]
pull_request:
workflow_dispatch:
schedule:
# run every week (for --pre release tests)
- cron: "0 0 * * 0"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -24,6 +21,9 @@ jobs:
test:
name: ${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.gui }} ${{ matrix.canvas }}
runs-on: ${{ matrix.os }}
env:
UV_PYTHON: ${{ matrix.python-version }}
UV_FROZEN: 1
strategy:
fail-fast: false
matrix:
Expand All @@ -43,6 +43,7 @@ jobs:
- os: macos-latest
gui: wxpython
python-version: "3.10"

include:
# test a couple more python variants, without
# full os/gui/canvas matrix coverage
Expand All @@ -59,6 +60,14 @@ jobs:
python-version: "3.9"
gui: pyqt
canvas: vispy
- os: ubuntu-latest
python-version: "3.11"
gui: pyqt
canvas: vispy
- os: ubuntu-latest
python-version: "3.13"
gui: pyqt
canvas: pygfx
- os: macos-13
gui: wxpython
python-version: "3.9"
Expand All @@ -70,74 +79,109 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: 🐍 Set up Python
uses: actions/setup-python@v5
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
enable-cache: true

- name: 📦 Install dependencies
# https://github.com/pyvista/setup-headless-display-action/pull/26
- name: Configure curl to disable revocation checks and add retries
if: matrix.os == 'windows-latest'
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[test,${{ matrix.gui }},${{ matrix.canvas }}]'
echo --ssl-no-revoke > C:\Users\runneradmin\_curlrc
echo '--retry 5' >> C:\Users\runneradmin\_curlrc
type C:\Users\runneradmin\_curlrc

- uses: pyvista/setup-headless-display-action@v3
with:
qt: ${{ matrix.gui == 'pyside' || matrix.gui == 'pyqt' }}

- name: Install llvmpipe and lavapipe for offscreen canvas
if: matrix.os == 'ubuntu-latest' && matrix.canvas == 'pygfx'
run: |
sudo apt-get update -y -qq
sudo apt install -y libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers

- name: install pytest-qt
if: matrix.gui == 'pyside' || matrix.gui == 'pyqt'
run: pip install pytest-qt

- name: 🧪 Test
run: |
pytest --cov --cov-report=xml -v --color yes tests

- uses: codecov/codecov-action@v5
- name: 🧪 Test (attempt 1)
id: test1
continue-on-error: true
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" cov=1

- name: 🧪 Test (attempt 2)
if: steps.test1.outcome == 'failure'
id: test2
continue-on-error: true
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" cov=1 verbose=1

- name: 🧪 Test (attempt 3)
if: steps.test2.outcome == 'failure'
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" cov=1 verbose=1

- name: 🧪 Test min dependencies (attempt 1)
id: min1
continue-on-error: true
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" min=1

- name: 🧪 Test min dependencies (attempt 2)
if: steps.min1.outcome == 'failure'
id: min2
continue-on-error: true
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" min=1 verbose=1

- name: 🧪 Test min dependencies (attempt 3)
if: steps.min2.outcome == 'failure'
shell: bash
run: make test extras="${{ matrix.gui }},${{ matrix.canvas }}" min=1 verbose=1

- name: Upload coverage
uses: actions/upload-artifact@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: covreport-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.gui }}-${{ matrix.canvas }}
path: ./.coverage*
include-hidden-files: true

test-array-libs:
uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@v2
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
extras: "test,vispy,third_party_arrays,pyqt"
coverage-upload: artifact
pip-post-installs: "pytest-qt"
qt: pyqt6
runs-on: ubuntu-latest
env:
UV_PYTHON: ${{ matrix.python-version }}
UV_FROZEN: 1
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.12"]

# make sure we can build docs without error
test-docs:
runs-on: macos-latest # nicer screenshots
steps:
- uses: actions/checkout@v4
- name: 🐍 Set up Python
uses: actions/setup-python@v5
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.x"
cache: "pip"
- name: 📦 Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[docs]'
- name: 📚 Build docs
run: mkdocs build --strict
- uses: actions/upload-artifact@v4
enable-cache: true
- uses: pyvista/setup-headless-display-action@v3
with:
name: docs
path: site
qt: true
- name: Install llvmpipe and lavapipe for offscreen canvas
run: sudo apt install -y libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers

- name: 🧪 Test (attempt 1)
id: test1
continue-on-error: true
run: make test extras="pyqt,pygfx" groups="array-libs" cov=1

- name: 🧪 Test (attempt 2)
if: steps.test1.outcome == 'failure'
id: test2
run: make test extras="pyqt,pygfx" groups="array-libs" cov=1 verbose=1

- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: covreport-py${{ matrix.python-version }}-array-libs
path: ./.coverage*
include-hidden-files: true

upload_coverage:
if: always()
Expand All @@ -146,6 +190,19 @@ jobs:
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}

# make sure we can build docs without error
test-docs:
runs-on: macos-latest # nicer screenshots
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- name: 📚 Build docs
run: uv run --group docs mkdocs build --strict
- uses: actions/upload-artifact@v4
with:
name: docs
path: site

deploy:
name: Deploy
needs: test
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v5
with:
python-version: 3.x

- name: Install mkdocs and mike
run: pip install '.[docs]'
enable-cache: true

- name: Config git
run: |
Expand All @@ -38,17 +35,17 @@ jobs:
if [[ $VERSION == *"rc"* ]] || [[ $VERSION == *"beta"* ]]; then
export DOCS_PRERELEASE=true
echo "Deploying pre-release docs"
mike deploy --push --update-aliases $VERSION rc
uv run --group docs mike deploy --push --update-aliases $VERSION rc
else
echo "Deploying release docs"
mike deploy --push --update-aliases $VERSION latest
uv run --group docs mike deploy --push --update-aliases $VERSION latest
fi
env:
DOCS_DEV: false

- name: Deploy dev docs
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: mike deploy --push --update-aliases dev
run: uv run --group docs mike deploy --push --update-aliases dev
env:
DOCS_DEV: true

Expand Down
Loading
Loading