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 2bc5f6d44f
commit ec471b4c28
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: d000a461c06afd061badf5cf90dd6c817bda94b9924684621f5c5ce865d703b8 hmac: 2721710e3f4d2a3483b10869803fb085beb1b01f1af58157d550057408df462e
... ...