-
Notifications
You must be signed in to change notification settings - Fork 66
85 lines (81 loc) · 2.7 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
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
name: test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test-w-ilastik-env:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
# for codecov
fetch-depth: 5
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ilastik-env
auto-activate-base: false
auto-update-conda: true
environment-file: .github/workflows/etc/ilastik-env.yaml
miniforge-variant: Mambaforge
use-mamba: true
- name: linux test
if: matrix.os == 'ubuntu-latest'
shell: bash -l {0}
run: |
pip install -e .
xvfb-run --server-args="-screen 0 1024x768x24" pytest --cov-report=xml --cov=volumina
- name: osx test
if: matrix.os == 'macos-10.15'
shell: bash -l {0}
run: |
pip install -e .
pytest
- name: windows test
if: matrix.os == 'windows-latest'
shell: cmd /C CALL {0}
# auto activation of env does not seem to work on win
run: |
pip install -e . & pytest
- uses: codecov/codecov-action@v3
if: matrix.os == 'ubuntu-latest'
with:
files: ./coverage.xml,
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
test-w-conda-recipe:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python_version: ["3.7", "3.8", "3.9"]
exclude:
- os: macos-latest
python_version: "3.7"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ""
auto-activate-base: true
auto-update-conda: true
miniforge-variant: Mambaforge
use-mamba: true
- name: install build deps
run: mamba install -n base -c conda-forge boa setuptools_scm -y
- name: linux conda build test
if: matrix.os == 'ubuntu-latest'
shell: bash -l {0}
run: xvfb-run --server-args="-screen 0 1024x768x24" conda mambabuild --python=${{ matrix.python_version }} -c conda-forge conda-recipe
- name: osx test
if: startsWith(matrix.os, 'macos')
shell: bash -l {0}
run: conda mambabuild -c conda-forge --python=${{ matrix.python_version }} conda-recipe
- name: windows conda-build
if: matrix.os == 'windows-latest'
shell: cmd /C CALL {0}
run: conda mambabuild -c conda-forge --python=${{ matrix.python_version }} conda-recipe