-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
76 lines (68 loc) · 3.06 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; Copyright IBM Inc. All Rights Reserved.
; SPDX-License-Identifier: Apache-2.0
#
# What changes between environments
# - python version
# - repository location
# - features available at test location (e.g. is LSF there?)
# - What git access is available (http/ssh)
# - Is a proxy required to access git
#
# Why multi-stage environment runs are not possible ...
#
# For each environment one might want to build then run test commands
# However there is no easy way to execute different commands in a given venv
# If you try to reuse a venv (using envdir) all dependencies are reinstalled
# because the tox environment name will be different (tox wipes previous installs)
[tox]
envlist: {py37,py38,py39,py310}-{deploy,test,testA,testB,testC}-{ibm,lsf}
#This is a hack to force pip to serialise installs
#i.e. install a set of packages before installing the next
#This happens particularly with numpy which MUST be installed
#for other package that depend on it to be installed
#Defaults for all environments
#Can make options conditional on a particular environment using $envname_part:
[testenv]
# VV: Upgrades pip, wheel, and setuptools to latest version
download=true
alwayscopy=true
extras=
deploy: deploy
envdir=
{test,testA,testB,testC}: {env:TEST_VENV:toxenv}
deploy: {env:DEPLOY_VENV:toxenv}
basepython=
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10
setenv= LC_ALL=en_GB.UTF-8
deps =
{py37,py38,py39,py310}: -rrequirement_files/requirements_base_3.txt
{py37}: -rrequirement_files/requirements_base_3.7.txt
lsf: -rrequirement_files/requirements_lsf.txt
allowlist_externals=printenv
git
rm
commands=
printenv
pip list
#Test st4sd-runtime-core by running etest.py on real package
#This will test non-deployment functionality
test: rm -rf CAFParameterisation.package
{test,testA}: stp --help
{test,testA}-ibm: git clone [email protected]:hartreechem/cafparameterisation.git CAFParameterisation.package
{test,testA}-ibm: etest.py -p panther --notestExecutables CAFParameterisation.package
{test,testA}-ibm: epatch.py -a --platform=paragon -e CAFParameterisation.package
#Test creation of execution chain of a component
{test,testA}-ibm: ctest.py -a panther -e CAFParameterisation.package -s 1 CAFSimulation0
{test,testA}-ibm: epatch.py -s0 -e CAFParameterisation.package stage2.DetermineShape...stage2.Montage --platform=paragon -x
# Unit-tests
test: pytest -vv --log-level=10 -n8 tests/
# Same unit-tests but split 3-ways to enable running them in parallel Travis jobs
testA: pytest -vv --timeout=240 --log-level=10 -n8 --ignore-glob=*test_control.py --ignore-glob=*test_engines.py tests/ --durations=0
testB: pytest -vv --timeout=240 --log-level=10 -n8 tests/test_control.py --durations=0
testC: pytest -vv --timeout=240 --log-level=10 -n8 tests/test_engines.py --durations=0
{test,testC}-ibm: git clone [email protected]:hartreechem/Synthetic.package.git
{test,testC}-ibm: elaunch.py --nostamp Synthetic.package
{test,testC}-ibm: einspect.py -f all Synthetic.instance