-
Notifications
You must be signed in to change notification settings - Fork 14
69 lines (60 loc) · 2.5 KB
/
Copy pathverify_published.yml
File metadata and controls
69 lines (60 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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.14", "3.13", "3.12", "3.11", "3.10"]
extras: ["", "[all]"]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Create virtual environment
run: |
python -m venv .venv
source .venv/bin/activate
- name: Install webknossos
run: |
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install webknossos${{ matrix.extras }}
- name: Verify installation
if: ${{ matrix.python-version != '3.10' }}
run: |
source .venv/bin/activate
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
- name: Verify installation
if: ${{ matrix.python-version == '3.10' }}
run: |
source .venv/bin/activate
python -c "import webknossos; from webknossos import version; print(f'webknossos version: {version.__version__}')"
- uses: slackapi/slack-github-action@v3.0.1
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}}>'