ci: add python file checks to ci
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
63e1dbfd8a
commit
066b6f2ec0
|
@ -13,6 +13,28 @@ local PipelineLinting = {
|
|||
'ansible-later',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'python-format',
|
||||
image: 'python:3.9',
|
||||
environment: {
|
||||
PY_COLORS: 1,
|
||||
},
|
||||
commands: [
|
||||
'pip install -qq yapf',
|
||||
'yapf -dr ./',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'python-flake8',
|
||||
image: 'python:3.9',
|
||||
environment: {
|
||||
PY_COLORS: 1,
|
||||
},
|
||||
commands: [
|
||||
'pip install -qq flake8',
|
||||
'flake8',
|
||||
],
|
||||
},
|
||||
],
|
||||
trigger: {
|
||||
ref: ['refs/heads/master', 'refs/tags/**', 'refs/pull/**'],
|
||||
|
|
18
.drone.yml
18
.drone.yml
|
@ -12,6 +12,22 @@ steps:
|
|||
commands:
|
||||
- ansible-later
|
||||
|
||||
- name: python-format
|
||||
image: python:3.9
|
||||
commands:
|
||||
- pip install -qq yapf
|
||||
- yapf -dr ./
|
||||
environment:
|
||||
PY_COLORS: 1
|
||||
|
||||
- name: python-flake8
|
||||
image: python:3.9
|
||||
commands:
|
||||
- pip install -qq flake8
|
||||
- flake8
|
||||
environment:
|
||||
PY_COLORS: 1
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
|
@ -131,6 +147,6 @@ depends_on:
|
|||
|
||||
---
|
||||
kind: signature
|
||||
hmac: fcf9d516c8151df05c66ce5f5b3b24b008c58f90cd4bc80882703f0621263bb2
|
||||
hmac: 19de33ebce63fedcdbabab80262f78d2d19e0431e2c043cf5fa6bd277c3c0da9
|
||||
|
||||
...
|
||||
|
|
|
@ -2,13 +2,9 @@ import os
|
|||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
import warnings
|
||||
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']
|
||||
).get_hosts('all')
|
||||
os.environ["MOLECULE_INVENTORY_FILE"]
|
||||
).get_hosts("all")
|
||||
|
||||
|
||||
def test_droneci_compose_file(host):
|
||||
|
|
Loading…
Reference in New Issue