Skip to content

Commit 22f5195

Browse files
committed
CI: Begin testing scripts on GA
1 parent 5fd2287 commit 22f5195

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

.github/workflows/test.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: NiBabel tests
2+
3+
on: [push]
4+
5+
defaults:
6+
run:
7+
shell: bash
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
15+
python-version: [3.8]
16+
architecture: ['x64', 'x86']
17+
install: ['setup']
18+
include:
19+
- os: ubuntu-latest
20+
python-version: 3.8
21+
architecture: x64
22+
install: wheel
23+
- os: ubuntu-latest
24+
python-version: 3.8
25+
architecture: x64
26+
install: sdist
27+
- os: ubuntu-latest
28+
python-version: 3.8
29+
architecture: x64
30+
install: archive
31+
exclude:
32+
- os: ubuntu-latest
33+
architecture: x86
34+
- os: macos-latest
35+
architecture: x86
36+
env:
37+
SETUP_REQUIRES: 'pip setuptools>=30.3.0 wheel'
38+
DEPENDS: 'numpy scipy matplotlib h5py pillow pydicom indexed_gzip'
39+
INSTALL_TYPE: ${{ matrix.install }}
40+
CHECK_TYPE: 'test'
41+
EXTRA_PIP_FLAGS: ''
42+
NIGHTLY_WHEELS: 'https://pypi.anaconda.org/scipy-wheels-nightly/simple'
43+
PRE_PIP_FLAGS: '--pre --extra-index-url $NIGHTLY_WHEELS'
44+
45+
steps:
46+
- uses: actions/checkout@v2
47+
with:
48+
submodules: recursive
49+
fetch-depth: 0
50+
- name: Set up Python ${{ matrix.python-version }}
51+
uses: actions/setup-python@v2
52+
with:
53+
python-version: ${{ matrix.python-version }}
54+
architecture: ${{ matrix.architecture }}
55+
- name: Display Python version
56+
run: python -c "import sys; print(sys.version)"
57+
- name: Create virtual environment
58+
run: tools/ci/create_env.sh
59+
- name: Build archive
60+
run: |
61+
source tools/ci/build_archive.sh
62+
echo "ARCHIVE=$ARCHIVE" >> $GITHUB_ENV
63+
- name: Install dependencies
64+
run: tools/ci/install_dependencies.sh
65+
- name: Install NiBabel
66+
run: tools/ci/install.sh
67+
- name: Run tests
68+
run: tools/ci/check.sh

tools/ci/check.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ echo CHECK_TYPE = $CHECK_TYPE
1111

1212
set -x
1313

14+
export NIBABEL_DATA_DIR="$PWD/nibabel-data"
15+
1416
if [ "${CHECK_TYPE}" == "style" ]; then
1517
# Run styles only on core nibabel code.
1618
flake8 nibabel

0 commit comments

Comments
 (0)