-
Notifications
You must be signed in to change notification settings - Fork 51
154 lines (119 loc) · 3.76 KB
/
Copy pathci.yml
File metadata and controls
154 lines (119 loc) · 3.76 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: ci
on:
push:
tags:
- v*
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
schedule:
- cron: "0 0 * * 1,3,5"
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ github.token }}
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1
tests:
needs: [pre-commit]
name: "pytest and snakemake"
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.11", "3.12", "3.13"]
exclude:
- os: macos-latest
python-version: "3.13"
steps:
- uses: actions/checkout@v5
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
- name: Set up the environment
uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Install extra dependencies
run: uv sync --extra cellpose --dev && uv pip install 'snakemake>=7.32.4,<9.0' 'pulp<2.8' 'cellpose==3.1.1'
- name: Tests
run: uv run poe test
- name: Snakemake
run: cd workflow && uv run snakemake --config sdata_path=tuto.zarr --configfile=config/toy/cellpose.yaml --workflow-profile profile/ci -c1
test_wsi:
needs: [pre-commit]
name: "${{ matrix.os }} | pytest wsi"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v5
- name: Set up the environment
uses: ./.github/actions/setup-python-env
- name: Install extra dependencies
run: uv sync --extra wsi --dev && uv pip install 'openslide-bin==4.0.0.8' 'openslide-python==1.4.2' 'slideio==2.7.1' 'timm==1.0.21'
- name: Tests
run: uv run poe test_wsi
test_cellpose_v4:
needs: [pre-commit]
name: "${{ matrix.os }} | pytest cellpose v4"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v5
- name: Set up the environment
uses: ./.github/actions/setup-python-env
- name: Install extra dependencies
run: uv sync --extra cellpose --dev
- name: Tests
run: uv run poe test_long
test_pip_install:
needs: [pre-commit]
name: "${{ matrix.os }} | pytest with pip install"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install sopa with pip
run: pip install -e . && pip install pytest-cov poethepoet
- name: Run short tests
run: poe test_short
deploy-docs:
needs: [tests, test_wsi, test_cellpose_v4, test_pip_install]
if: contains(github.ref, 'tags')
name: "Deploy documentation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up the environment
uses: ./.github/actions/setup-python-env
- name: Install extra dependencies
run: uv sync --dev
- name: Build documentation
run: uv run mkdocs gh-deploy --force
pypi-release:
needs: [tests, test_wsi, test_cellpose_v4, test_pip_install]
if: contains(github.ref, 'tags')
name: "PyPI release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up the environment
uses: ./.github/actions/setup-python-env
- name: Build
run: uv build
- name: Publish
run: uv publish -t ${{ secrets.PYPI_TOKEN }}