@@ -5,13 +5,17 @@ on: [pull_request, push]
55jobs :
66 test :
77 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:
811 VERSIONMAP : ' {"3.6": "36", "3.7": "37", "3.8": "38", "3.9": "39"}'
12+
913 strategy :
1014 matrix :
1115 os : [ubuntu-latest, macos-latest, windows-latest]
1216 python-version : [3.6, 3.7, 3.8, 3.9]
1317 environment-type : [conda, bare]
14- suffix : ['']
18+ suffix : [''] # placeholder as an alternative to "-min"
1519 include :
1620 - os : ubuntu-latest
1721 python-version : 3.6
4246 python-version : ${{ matrix.python-version }}
4347 auto-activate-base : false
4448 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
4551 REQUIREMENTS : ci/requirements-py${{ fromJSON(env.VERSIONMAP)[matrix.python-version] }}${{ matrix.suffix }}.yml
4652
4753 - name : Create bare environment
5561 - name : Run tests
5662 shell : bash -l {0} # necessary for conda env to be active
5763 env :
64+ # we want --remote-data only on conda+linux, so use this short-circuiting logic:
5865 ARGS : " ${{ (matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda') && '--remote-data' || '' }}"
5966 NREL_API_KEY : ${{ secrets.NREL_API_KEY }}
6067 BSRN_FTP_USERNAME : ${{ secrets.BSRN_FTP_USERNAME }}
0 commit comments