remove tox and build native drone test environments

This commit is contained in:
Robert Kaussow 2019-03-22 10:08:11 +01:00
parent f882ecbbfd
commit 6eae4ecbd5
3 changed files with 213 additions and 30 deletions

View File

@ -1,32 +1,34 @@
local PythonVersions(pyversion="2.7", py="27") = { local PipelineEmvironment(pyversion="2.7", ansibleversion="2.4") = {
name: "python" + pyversion, name: "ansible" + ansibleversion,
image: "python:" + pyversion, image: "python:" + pyversion,
pull: "always", pull: "always",
commands: [ commands: [
"pip install tox -q", "pip install -q ansible~=" + ansibleversion,
"tox -e $(tox -l | grep py" + py + " | xargs | sed 's/ /,/g') -q", "pip install -q -r tests/requirements.txt",
"pip install -q .",
"ansible-later -c tests/config/config.ini tests/data/yaml_success.yml"
], ],
depends_on: [ depends_on: [
"clone", "clone",
], ],
}; };
local PipelineTesting = { local PipelineTesting(pyversion="2.7") = {
kind: "pipeline", kind: "pipeline",
name: "testing", name: "python-" + pyversion,
platform: { platform: {
os: "linux", os: "linux",
arch: "amd64", arch: "amd64",
}, },
steps: [ steps: [
PythonVersions(pyversion="2.7", py="27"), PipelineEmvironment(pyversion, ansibleversion="2.4"),
PythonVersions(pyversion="3.5", py="35"), PipelineEmvironment(pyversion, ansibleversion="2.5"),
PythonVersions(pyversion="3.6", py="36"), PipelineEmvironment(pyversion, ansibleversion="2.6"),
PythonVersions(pyversion="3.7", py="37"), PipelineEmvironment(pyversion, ansibleversion="2.7"),
], ],
}; };
local PipelineBuild = { local PipelineBuild(depends_on=[]) = {
kind: "pipeline", kind: "pipeline",
name: "build", name: "build",
platform: { platform: {
@ -89,9 +91,7 @@ local PipelineBuild = {
}, },
}, },
], ],
depends_on: [ depends_on: depends_on,
"testing",
],
}; };
local PipelineNotifications = { local PipelineNotifications = {
@ -123,7 +123,15 @@ local PipelineNotifications = {
}; };
[ [
PipelineTesting, PipelineTesting(pyversion="2.7"),
PipelineBuild, PipelineTesting(pyversion="3.5"),
PipelineTesting(pyversion="3.6"),
PipelineTesting(pyversion="3.7"),
PipelineBuild(depends_on=[
'python-2.7',
'python-3.5',
'python-3.6',
'python-3.7',
]),
PipelineNotifications, PipelineNotifications,
] ]

View File

@ -1,45 +1,212 @@
--- ---
kind: pipeline kind: pipeline
name: testing name: python-2.7
platform: platform:
os: linux os: linux
arch: amd64 arch: amd64
steps: steps:
- name: python2.7 - name: ansible2.4
pull: always pull: always
image: python:2.7 image: python:2.7
commands: commands:
- pip install tox -q - pip install -q ansible~=2.4
- "tox -e $(tox -l | grep py27 | xargs | sed 's/ /,/g') -q" - pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on: depends_on:
- clone - clone
- name: python3.5 - name: ansible2.5
pull: always
image: python:2.7
commands:
- pip install -q ansible~=2.5
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.6
pull: always
image: python:2.7
commands:
- pip install -q ansible~=2.6
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.7
pull: always
image: python:2.7
commands:
- pip install -q ansible~=2.7
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
---
kind: pipeline
name: python-3.5
platform:
os: linux
arch: amd64
steps:
- name: ansible2.4
pull: always pull: always
image: python:3.5 image: python:3.5
commands: commands:
- pip install tox -q - pip install -q ansible~=2.4
- "tox -e $(tox -l | grep py35 | xargs | sed 's/ /,/g') -q" - pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on: depends_on:
- clone - clone
- name: python3.6 - name: ansible2.5
pull: always
image: python:3.5
commands:
- pip install -q ansible~=2.5
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.6
pull: always
image: python:3.5
commands:
- pip install -q ansible~=2.6
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.7
pull: always
image: python:3.5
commands:
- pip install -q ansible~=2.7
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
---
kind: pipeline
name: python-3.6
platform:
os: linux
arch: amd64
steps:
- name: ansible2.4
pull: always pull: always
image: python:3.6 image: python:3.6
commands: commands:
- pip install tox -q - pip install -q ansible~=2.4
- "tox -e $(tox -l | grep py36 | xargs | sed 's/ /,/g') -q" - pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on: depends_on:
- clone - clone
- name: python3.7 - name: ansible2.5
pull: always
image: python:3.6
commands:
- pip install -q ansible~=2.5
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.6
pull: always
image: python:3.6
commands:
- pip install -q ansible~=2.6
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.7
pull: always
image: python:3.6
commands:
- pip install -q ansible~=2.7
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
---
kind: pipeline
name: python-3.7
platform:
os: linux
arch: amd64
steps:
- name: ansible2.4
pull: always pull: always
image: python:3.7 image: python:3.7
commands: commands:
- pip install tox -q - pip install -q ansible~=2.4
- "tox -e $(tox -l | grep py37 | xargs | sed 's/ /,/g') -q" - pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.5
pull: always
image: python:3.7
commands:
- pip install -q ansible~=2.5
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.6
pull: always
image: python:3.7
commands:
- pip install -q ansible~=2.6
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.7
pull: always
image: python:3.7
commands:
- pip install -q ansible~=2.7
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on: depends_on:
- clone - clone
@ -105,7 +272,10 @@ steps:
- tag - tag
depends_on: depends_on:
- testing - python-2.7
- python-3.5
- python-3.6
- python-3.7
--- ---
kind: pipeline kind: pipeline

5
tests/requirements.txt Normal file
View File

@ -0,0 +1,5 @@
flake8
pep8-naming
wheel
flake8-colors
pytest