ci: add python file checks to ci
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
f6fc7b95bf
commit
e6bd2bf3a6
@ -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/**'],
|
||||||
|
18
.drone.yml
18
.drone.yml
@ -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
|
||||||
|
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user