forked from SciTools/cf-units
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
56 lines (52 loc) · 1.8 KB
/
tox.ini
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
[tox]
requires =
tox-conda
tox-run-command
[testenv:py{39,310,311}-lock]
allowlist_externals =
cp
changedir =
{env:LOCKDIR}
conda_channels =
conda-forge
conda_create_args =
--override-channels
conda_deps =
pip
conda-lock
description =
Create explicit environment specification conda lock files for cf-units dependencies.
platform =
linux|darwin
setenv =
LOCKDIR = {toxinidir}{/}requirements{/}locks
TMPFILE = {envtmpdir}{/}cf-units.yml
YMLFILE = {toxinidir}{/}requirements{/}cf-units.yml
skip_install =
true
commands =
cp {env:YMLFILE} {env:TMPFILE}
python -c 'from sys import version_info as v; fh = open("{env:TMPFILE}", "a"); fh.write(f"\n - python =\{v.major\}.\{v.minor\}\n")'
conda-lock --channel conda-forge --kind explicit --file {env:TMPFILE} --platform linux-64 --filename-template "{envname}-\{platform\}.txt" {posargs}
[testenv:py{39,310,311}-{linux,osx,win}-test]
conda_spec =
py39-linux: {toxinidir}{/}requirements{/}locks{/}py39-lock-linux-64.txt
py310-linux: {toxinidir}{/}requirements{/}locks{/}py310-lock-linux-64.txt
py311-linux: {toxinidir}{/}requirements{/}locks{/}py311-lock-linux-64.txt
py39-osx: {toxinidir}{/}requirements{/}locks{/}py39-lock-osx-64.txt
py310-osx: {toxinidir}{/}requirements{/}locks{/}py310-lock-osx-64.txt
py311-osx: {toxinidir}{/}requirements{/}locks{/}py311-lock-osx-64.txt
py39-win: {toxinidir}{/}requirements{/}locks{/}py39-lock-win-64.txt
py310-win: {toxinidir}{/}requirements{/}locks{/}py310-lock-win-64.txt
py311-win: {toxinidir}{/}requirements{/}locks{/}py311-lock-win-64.txt
description =
Perform cf-units unit/integration tests.
passenv =
CODECOV_TOKEN
CYTHON_COVERAGE
POST_COMMAND
usedevelop =
true
commands =
pytest {posargs}
{env:POST_COMMAND:}