ci: add python file checks to ci
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2021-06-07 22:28:49 +02:00
parent defcfa91df
commit 2692fc5fd2
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 39 additions and 1 deletions

View File

@ -13,6 +13,28 @@ local PipelineLinting = {
'ansible-later', '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: { trigger: {
ref: ['refs/heads/master', 'refs/tags/**', 'refs/pull/**'], ref: ['refs/heads/master', 'refs/tags/**', 'refs/pull/**'],

View File

@ -12,6 +12,22 @@ steps:
commands: commands:
- ansible-later - 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: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -99,6 +115,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: 7837bfea7f4eb7a62155b311d8546d45c41d3f09685eeedbe7b0418d3565f5b1 hmac: 87611f37ee6e46a121da27f677cdf1a195a91841f7ae699a823be6601d400fef
... ...