@@ -5,13 +5,17 @@ on: [pull_request, push]
5
5
jobs :
6
6
test :
7
7
env :
8
+ # we need to turn "3.6" into 36 to build the conda requirement filename,
9
+ # but there's no good way to do that via string manipulation. So set up
10
+ # a map that will be parsed as JSON later:
8
11
VERSIONMAP : ' {"3.6": "36", "3.7": "37", "3.8": "38", "3.9": "39"}'
12
+
9
13
strategy :
10
14
matrix :
11
15
os : [ubuntu-latest, macos-latest, windows-latest]
12
16
python-version : [3.6, 3.7, 3.8, 3.9]
13
17
environment-type : [conda, bare]
14
- suffix : ['']
18
+ suffix : [''] # placeholder as an alternative to "-min"
15
19
include :
16
20
- os : ubuntu-latest
17
21
python-version : 3.6
42
46
python-version : ${{ matrix.python-version }}
43
47
auto-activate-base : false
44
48
env :
49
+ # build requirement filename. First replacement is for the python
50
+ # version, mapping from "3.7" to "37", second is to add "-min" if needed
45
51
REQUIREMENTS : ci/requirements-py${{ fromJSON(env.VERSIONMAP)[matrix.python-version] }}${{ matrix.suffix }}.yml
46
52
47
53
- name : Create bare environment
55
61
- name : Run tests
56
62
shell : bash -l {0} # necessary for conda env to be active
57
63
env :
64
+ # we want --remote-data only on conda+linux, so use this short-circuiting logic:
58
65
ARGS : " ${{ (matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda') && '--remote-data' || '' }}"
59
66
NREL_API_KEY : ${{ secrets.NREL_API_KEY }}
60
67
BSRN_FTP_USERNAME : ${{ secrets.BSRN_FTP_USERNAME }}
0 commit comments