Verify Published Package #10
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: Verify Published Package | |
# Verifies that the published webknossos package on PyPi.org can be installed and imported | |
# across different Python versions. Tests both basic installation and "all" optional | |
# dependencies. Runs nightly to ensure consistent package availability. | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Run every night at midnight | |
workflow_dispatch: # Allow manual trigger | |
jobs: | |
verify-published: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.12", "3.11", "3.10", "3.9"] | |
extras: ["", "[all]"] | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Create virtual environment | |
run: | | |
python -m venv .venv | |
source .venv/bin/activate | |
- name: Install webknossos | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install webknossos${{ matrix.extras }} | |
- name: Verify installation | |
run: | | |
python -c "import webknossos; from webknossos import version; print(f'webknossos version: {version.__version__}')" | |
if [ "${{ matrix.extras }}" = "[all]" ]; then | |
# Verify some of the optional dependencies are available | |
python -c "import tifffile; import imagecodecs; import pandas;" | |
fi |