-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (61 loc) · 1.82 KB
/
tests.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
name: CI-Tests
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
env:
FSLOUTPUTTYPE: NIFTI_GZ
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
# - 'macos-11'
# - 'macos-12'
- 'ubuntu-22.04'
- 'ubuntu-20.04'
python-version:
- '3.9'
steps:
- name: Get home directory
run: |
echo ~
echo $HOME
- uses: actions/checkout@v3
# - name: Set XCode version
# if: contains(matrix.os, 'macos-11.0')
# run: sudo xcode-select -s "/Applications/Xcode_12.2.app"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Package installation
run: |
echo "fsleyes-plugin-shimming-toolbox installation"
make install
- name: Set path for Shimming Toolbox
run: |
echo "$HOME/shimming-toolbox/bin" >> $GITHUB_PATH
- name: prelude Ubuntu
if: contains(matrix.os, 'ubuntu')
run: |
echo "Download prelude"
st_download_data prelude
sudo install prelude/prelude /usr/local/bin
# - name: Run unit tests Mac
# if: contains(matrix.os, 'macos')
# run: |
# source ~/shimming-toolbox/python/bin/activate # to be able to call conda
# py.test . -v
- name: Run unit tests Ubuntu
if: contains(matrix.os, 'ubuntu')
run: |
source ~/shimming-toolbox/python/bin/activate # to be able to call conda
xvfb-run -a -s "-screen 0 1920x1200x24" py.test . -v