-
Notifications
You must be signed in to change notification settings - Fork 2
103 lines (81 loc) · 2.47 KB
/
testing.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Unit Tests
on: [push, pull_request]
jobs:
build:
env:
DISPLAY: ":99.0" # arbitrary
# GSETTINGS_SCHEMA_DIR_CONDA_BACKUP is somehow related to the following issue https://github.com/conda/conda/issues/9966
# GSETTINGS_SCHEMA_DIR_CONDA_BACKUP: "/usr/share/miniconda/envs/testenv/share/glib-2.0/schemas"
strategy:
matrix:
python-version: [3.8, 3.9]
host-os: ["ubuntu-latest"]
# host-os: ["ubuntu-latest", "macos-latest"]
# host-os: ["ubuntu-latest", "macos-latest", "windows-latest"]
fail-fast: false
runs-on: ${{ matrix.host-os }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
channel-priority: flexible
auto-update-conda: true
show-channel-urls: true
allow-softlinks: true
auto-activate-base: false
activate-environment: testenv
use-only-tar-bz2: false
- name: Install Conda packages
run: |
set -vxeo pipefail # -u is removed (substitute unset EVs with blanks)
conda install -y \
python=${{ matrix.python-version }} \
pip \
tomopy \
pyxrf \
-c conda-forge
conda list
pip list
- name: Update packages
run: |
set -vxeuo pipefail
python -m pip install --upgrade pip setuptools
- name: Install 'svmbir' - Linux
if: matrix.host-os == 'ubuntu-latest'
run: |
set -vxeuo pipefail
pip install svmbir
- name: Install 'svmbir' - Mac OS
if: matrix.host-os == 'macos-latest'
run: |
set -vxeuo pipefail
ln -sf /usr/local/bin/gcc-10 /usr/local/bin/gcc
gcc --version
CC=gcc pip install --no-binary svmbir svmbir
- name: Install 'svmbir' - Windows
if: matrix.host-os == 'windows-latest'
run: |
set -vxeuo pipefail
CC=msvc pip install svmbir
- name: Install PyPI packages
run: |
set -vxeuo pipefail
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install .
conda list
pip list
python --version
- name: Test with pytest
run: |
set -vxeuo pipefail
coverage run -m pytest -vvv
coverage report -m