-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathtox.ini
76 lines (73 loc) · 2.35 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
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions and providers.
# To use it, "pip install tox" and then run "tox" from this directory.
# You will have to set all required environment variables (below) before
# running the tests.
[tox]
envlist = {py3.10,pypy}-{aws,azure,gcp,openstack,mock},lint
[testenv]
commands = # see setup.cfg for options sent to pytest and coverage
coverage run --source=cloudbridge -m pytest -n 5 tests/ -v {posargs}
setenv =
# Fix for moto import issue: https://github.com/travis-ci/travis-ci/issues/7940
BOTO_CONFIG=/dev/null
aws: CB_TEST_PROVIDER=aws
azure: CB_TEST_PROVIDER=azure
gcp: CB_TEST_PROVIDER=gcp
openstack: CB_TEST_PROVIDER=openstack
mock: CB_TEST_PROVIDER=mock
# https://github.com/nedbat/coveragepy/issues/883#issuecomment-650562896
COVERAGE_FILE=.coverage.{envname}
passenv =
PYTHONUNBUFFERED
aws: CB_IMAGE_AWS
aws: CB_VM_TYPE_AWS
aws: CB_PLACEMENT_AWS
aws: AWS_ACCESS_KEY
aws: AWS_SECRET_KEY
azure: CB_IMAGE_AZURE
azure: CB_VM_TYPE_AZURE
azure: AZURE_SUBSCRIPTION_ID
azure: AZURE_CLIENT_ID
azure: AZURE_SECRET
azure: AZURE_TENANT
azure: AZURE_REGION_NAME
azure: AZURE_RESOURCE_GROUP
azure: AZURE_STORAGE_ACCOUNT
azure: AZURE_VM_DEFAULT_USER_NAME
azure: AZURE_PUBLIC_KEY_STORAGE_TABLE_NAME
gcp: CB_IMAGE_GCP
gcp: CB_VM_TYPE_GCP
gcp: CB_PLACEMENT_GCP
gcp: GCP_DEFAULT_REGION
gcp: GCP_DEFAULT_ZONE
gcp: GCP_PROJECT_NAME
gcp: GCP_SERVICE_CREDS_FILE
gcp: GCP_SERVICE_CREDS_DICT
openstack: CB_IMAGE_OS
openstack: CB_VM_TYPE_OS
openstack: CB_PLACEMENT_OS
openstack: OS_AUTH_URL
openstack: OS_PASSWORD
openstack: OS_PROJECT_NAME
openstack: OS_TENANT_NAME
openstack: OS_USERNAME
openstack: OS_REGION_NAME
openstack: OS_USER_DOMAIN_NAME
openstack: OS_PROJECT_DOMAIN_NAME
openstack: NOVA_SERVICE_NAME
openstack: OS_APPLICATION_CREDENTIAL_ID
openstack: OS_APPLICATION_CREDENTIAL_SECRET
mock: CB_IMAGE_AWS
mock: CB_VM_TYPE_AWS
mock: CB_PLACEMENT_AWS
mock: AWS_ACCESS_KEY
mock: AWS_SECRET_KEY
deps =
-rrequirements.txt
coverage
pytest-xdist
[testenv:lint]
commands = flake8 cloudbridge tests setup.py
deps = flake8