ci: add python file checks to ci
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
361e629ea5
commit
bf21f1a0a6
@ -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: 52e0e958af6f1bc31666f2e6d9667ef5028f82ed1255cc2f5ef1bedc99142d02
|
||||
hmac: a57deec8454606c10d1bf88110fe3a7096afa4294d741e34fb8fbe15df5578c6
|
||||
|
||||
...
|
||||
|
@ -1,10 +1,7 @@
|
||||
import os
|
||||
import warnings
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ["MOLECULE_INVENTORY_FILE"]
|
||||
).get_hosts("all")
|
||||
|
Loading…
Reference in New Issue
Block a user