ci: add python file checks to ci
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2021-06-07 22:28:19 +02:00
parent ab5fdc4015
commit 41b250a295
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 41 additions and 7 deletions

View File

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

View File

@ -12,6 +12,22 @@ steps:
commands:
- 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:
ref:
- refs/heads/master
@ -131,6 +147,6 @@ depends_on:
---
kind: signature
hmac: d3dcc7dd68f793d4c1a75587e49ff7245d6a231ed7ab9ec766d6af069ac72748
hmac: be60ea78f3ca02e947e9b61f0b91ed0942f4c9de43db376c9b8f75b0480a0323
...

View File

@ -2,13 +2,9 @@ import os
import testinfra.utils.ansible_runner
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']
).get_hosts('all')
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")
def test_minio_running_and_enabled(host):