Skip to content

Commit 764b5c5

Browse files
authored
Run tests for zarr v2 and v3 (#44)
* migrate tests to the newer biocsetup, run tests for zarr v2 and v3 * ignore 3.14 for now.
1 parent da09179 commit 764b5c5

1 file changed

Lines changed: 42 additions & 27 deletions

File tree

.github/workflows/pypi-test.yaml

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,57 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
41
name: Test the library
52

63
on:
7-
workflow_dispatch
8-
# push:
9-
# branches: [main]
10-
# pull_request:
11-
# branches: [main]
4+
push:
5+
branches:
6+
- master # for legacy repos
7+
- main
8+
pull_request:
9+
branches:
10+
- master # for legacy repos
11+
- main
12+
workflow_dispatch:
13+
schedule:
14+
- cron: "0 0 1,16 * *"
15+
16+
permissions:
17+
contents: read
18+
19+
concurrency:
20+
group: >-
21+
${{ github.workflow }}-${{ github.ref_type }}-
22+
${{ github.event.pull_request.number || github.sha }}
23+
cancel-in-progress: true
1224

1325
jobs:
14-
build:
15-
runs-on: ubuntu-latest
26+
test:
1627
strategy:
1728
matrix:
18-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
29+
python: ["3.10", "3.11", "3.12", "3.13"] #, "3.14"
30+
zarr: ["2.*", "3.*"]
31+
platform:
32+
- ubuntu-latest
33+
# - macos-latest
34+
# - windows-latest
35+
36+
runs-on: ${{ matrix.platform }}
37+
name: Python ${{ matrix.python }}, Zarr ${{ matrix.zarr }}, ${{ matrix.platform }}
1938

20-
name: Python ${{ matrix.python-version }}
2139
steps:
22-
- uses: actions/checkout@v2
23-
- name: Setup Python
24-
uses: actions/setup-python@v4
40+
- uses: actions/checkout@v4
41+
42+
- uses: actions/setup-python@v5
43+
id: setup-python
2544
with:
26-
python-version: ${{ matrix.python-version }}
27-
cache: "pip"
45+
python-version: ${{ matrix.python }}
46+
2847
- name: Install dependencies
2948
run: |
3049
python -m pip install --upgrade pip
31-
pip install flake8 pytest tox
50+
pip install "zarr==${{ matrix.zarr }}"
51+
pip install tox coverage
3252
33-
# - name: Lint with flake8
34-
# run: |
35-
# # stop the build if there are Python syntax errors or undefined names
36-
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37-
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38-
# # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39-
40-
- name: Test with tox
41-
run: |
53+
- name: Run tests
54+
run: >-
55+
pipx run --python '${{ steps.setup-python.outputs.python-path }}'
4256
tox
57+
-- -rFEx --durations 10 --color yes --cov --cov-branch --cov-report=xml

0 commit comments

Comments
 (0)