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:18 +02:00
parent 4c07a46468
commit 537123d5d3
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: 9c947267b3a6b825833fc68f1f32723e43d1b75e19950f9ad9a8255a87d4a878 hmac: a8aaefa5ab0b9f4c5c5089c8750fce89861ab3fd985fc240072b507c03d06110
... ...