-
Notifications
You must be signed in to change notification settings - Fork 30
78 lines (75 loc) · 2.78 KB
/
Copy pathtest-python-scripts.yml
File metadata and controls
78 lines (75 loc) · 2.78 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
name: test-python-scripts
on:
push:
branches:
- gh-pages
- master
pull_request:
jobs:
test-python-all-platforms:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: install xvfb/deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -yy mesa-utils libgl1-mesa-dev xvfb curl
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: test
channel-priority: strict
miniforge-version: latest
conda-remove-defaults: "true"
- name: install common conda dependencies
run: conda install -n test -c conda-forge -c euro-bioimaging python=3.12 napari=0.6.6 pyqt pytest notebook matplotlib jupytext "scikit-image>=0.20" openijtiff -y
- name: linux test
if: matrix.os == 'ubuntu-latest'
shell: bash -l {0}
run: xvfb-run --server-args="-screen 0 1024x768x24" conda run -n test pytest -vv test_python/test_all_platforms.py
- name: osx test
if: matrix.os == 'macos-latest'
shell: bash -l {0}
run: conda run -n test pytest -vv test_python/test_all_platforms.py
- name: windows test
if: matrix.os == 'windows-latest'
shell: cmd /C CALL {0}
run: conda run -n test pytest -vv test_python/test_all_platforms.py
test-python-unix: # Fails because lacking download capability
# This will prevent it from running on any standard event
if: github.event_name == 'none'
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: install xvfb/deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -yy mesa-utils libgl1-mesa-dev xvfb curl
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: test
channel-priority: strict
miniforge-version: latest
environment-file: _includes/tool_installation/image_data_formats_conda_env.yml
conda-remove-defaults: "true"
- name: install common conda dependencies
run: conda install -n test -c conda-forge pytest -y
- name: linux test
if: matrix.os == 'ubuntu-latest'
shell: bash -l {0}
run: xvfb-run --server-args="-screen 0 1024x768x24" conda run -n test pytest -v test_python/test_unix.py
- name: osx test
if: matrix.os == 'macos-latest'
shell: bash -l {0}
run: conda run -n test pytest -v test_python/test_unix.py