@@ -18,16 +18,11 @@ permissions:
18
18
contents : read
19
19
20
20
jobs :
21
- build-linux :
21
+ cache-test-data :
22
22
if : " !contains(github.event.head_commit.message, '[skip ci]')"
23
23
runs-on : ubuntu-latest
24
24
env :
25
25
TEST_DATA_HOME : /home/runner/testdata/nitransforms-tests
26
- strategy :
27
- max-parallel : 5
28
- matrix :
29
- python-version : ['3.8', '3.9', '3.10', '3.11']
30
-
31
26
steps :
32
27
- name : Git settings (pacify DataLad)
33
28
run : |
48
43
python-${{ matrix.python-version }}-
49
44
- name : Install DataLad
50
45
run : |
51
- $CONDA/bin/conda install -c conda-forge git-annex datalad pip pytest
52
- $CONDA/bin/ python -m pip install datalad-osf
46
+ $CONDA/bin/conda install -c conda-forge git-annex
47
+ python -m pip install datalad datalad-next datalad-osf
53
48
54
49
- uses : actions/cache@v3
55
50
with :
@@ -62,19 +57,40 @@ jobs:
62
57
run : |
63
58
export PATH=$CONDA/bin:$PATH
64
59
mkdir -p /home/runner/testdata
65
- cd /home/runner/testdata
66
60
67
- $CONDA/bin/datalad install https://gin.g-node.org/oesteban/nitransforms-tests
68
- $CONDA/bin/datalad update --merge -d nitransforms-tests/
69
- $CONDA/bin/datalad get -d nitransforms-tests/
61
+ datalad install -s https://gin.g-node.org/oesteban/nitransforms-tests $TEST_DATA_HOME
62
+ datalad update --merge -d $TEST_DATA_HOME
63
+ datalad get -J 2 -d $TEST_DATA_HOME
64
+
65
+ build-linux :
66
+ if : " !contains(github.event.head_commit.message, '[skip ci]')"
67
+ runs-on : ubuntu-latest
68
+ needs : [cache-test-data]
69
+ env :
70
+ TEST_DATA_HOME : /home/runner/testdata/nitransforms-tests
71
+ strategy :
72
+ max-parallel : 5
73
+ matrix :
74
+ python-version : ['3.8', '3.9', '3.10', '3.11']
75
+ steps :
76
+ - name : Set up Python ${{ matrix.python-version }}
77
+ uses : actions/setup-python@v4
78
+ with :
79
+ python-version : ${{ matrix.python-version }}
80
+ - uses : actions/cache@v3
81
+ with :
82
+ path : ${{ env.TEST_DATA_HOME }}
83
+ key : data-cache-v2
84
+ restore-keys : |
85
+ data-cache-v2
70
86
71
87
- uses : actions/checkout@v3
72
88
- name : Install minimal dependencies
73
89
run : |
74
- $CONDA/bin/ pip install .[tests]
90
+ pip install .[tests]
75
91
- name : Run pytest
76
92
run : |
77
- $CONDA/bin/ pytest -v --cov nitransforms --cov-config .coveragerc --cov-report xml:cov.xml --doctest-modules nitransforms/
93
+ pytest -v --cov nitransforms --cov-config .coveragerc --cov-report xml:cov.xml --doctest-modules nitransforms/
78
94
79
95
- name : Submit code coverage
80
96
uses : codecov/codecov-action@v3
0 commit comments