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:39 +02:00
parent f6fc7b95bf
commit e6bd2bf3a6
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: 337746585d7db3952e5891cb5bc80872035f421edcc089e3c2fe9677d340f78a hmac: dec90ce54c2a01e536f1feb55612be6089adc6030dbf8b242c1b0d6fc1d5d835
... ...