-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (49 loc) · 1.72 KB
/
test.yml
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
name: tests
on:
push:
branches: [main]
tags: ["v*"] # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request: {}
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# these libraries enable testing on Qt on linux and OpenGL on Windows
- uses: pyvista/setup-headless-display-action@v2
with:
qt: true
# note: if you need dependencies from conda, considering using
# setup-miniconda: https://github.com/conda-incubator/setup-miniconda
- name: Install conda dependencies
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: conda_config.yml
channel-priority: true
- name: Install pip dependencies
shell: bash -el {0} # this is necessary to activate the conda env
run: |
pip install ".[testing]"
- name: Test with pytest
shell: bash -el {0}
run: |
pytest --color=yes --cov=motile-napari-plugin --cov-report=xml --cov-report=term-missing tests
- name: Coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: funkelab/motile-napari-plugin