Split tox step out of test pipelines
This commit is contained in:
parent
1251532ca6
commit
c9eaaaa45c
31
.drone.star
31
.drone.star
@ -25,13 +25,13 @@ def get_workspace():
|
|||||||
# Builds a list of all test pipelines to be executed
|
# Builds a list of all test pipelines to be executed
|
||||||
def build_test_pipelines():
|
def build_test_pipelines():
|
||||||
test_pipelines = [
|
test_pipelines = [
|
||||||
test("python:3.5"),
|
test_pipeline("python:3.5"),
|
||||||
test("python:3.6"),
|
test_pipeline("python:3.6"),
|
||||||
test("python:3.7"),
|
test_pipeline("python:3.7"),
|
||||||
test("python:3.8"),
|
test_pipeline("python:3.8"),
|
||||||
test("python:3"),
|
test_pipeline("python:3"),
|
||||||
test("pypy:3.6", "pypy3", "pypy3"),
|
test_pipeline("pypy:3.6", "pypy3", "pypy3"),
|
||||||
test("pypy:3", "pypy3", "pypy3"),
|
test_pipeline("pypy:3", "pypy3", "pypy3"),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Converge all tests on a single pipeline "py-tests"
|
# Converge all tests on a single pipeline "py-tests"
|
||||||
@ -55,14 +55,22 @@ def wait_for_all_tests(test_pipelines, name="py-tests"):
|
|||||||
|
|
||||||
|
|
||||||
# Builds a single test pipeline
|
# Builds a single test pipeline
|
||||||
def test(docker_tag, python_cmd="python", tox_env="py3"):
|
def test_pipeline(docker_tag, python_cmd="python", tox_env="py3"):
|
||||||
return {
|
return {
|
||||||
"kind": "pipeline",
|
"kind": "pipeline",
|
||||||
"name": "test {}".format(docker_tag.replace(":", "")),
|
"name": "test {}".format(docker_tag.replace(":", "")),
|
||||||
"workspace": get_workspace(),
|
"workspace": get_workspace(),
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
tox(docker_tag, python_cmd, tox_env),
|
||||||
"name": "test",
|
notify_step(),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Builds a single python test step
|
||||||
|
def tox(docker_tag, python_cmd="python", tox_env="py3"):
|
||||||
|
return {
|
||||||
|
"name": "test {}".format(docker_tag.replace(":", "")),
|
||||||
"image": docker_tag,
|
"image": docker_tag,
|
||||||
"environment": {
|
"environment": {
|
||||||
"TOXENV": tox_env,
|
"TOXENV": tox_env,
|
||||||
@ -72,9 +80,6 @@ def test(docker_tag, python_cmd="python", tox_env="py3"):
|
|||||||
"pip install tox",
|
"pip install tox",
|
||||||
"tox",
|
"tox",
|
||||||
],
|
],
|
||||||
},
|
|
||||||
notify_step()
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user