Skip to content

Verify Published Package #364

Verify Published Package

Verify Published Package #364

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.13", "3.12", "3.11", "3.10"]
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
- uses: slackapi/[email protected]
if: failure() || cancelled()
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
attachments:
- color: "#f00"
blocks:
- type: "section"
text:
type: "mrkdwn"
text: ':fire: Job <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}|${{github.job}}> of workflow "${{github.workflow}}" failed'
- type: "context"
elements:
- type: mrkdwn
text: '<${{github.repositoryUrl}}|${{github.repository}}>'