From 72c0de363332c8f7d21249eadc8577880db6c5e9 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 7 Jun 2021 22:28:26 +0200 Subject: [PATCH] ci: add python file checks to ci --- .drone.jsonnet | 22 ++++++++++++++++++++++ .drone.yml | 18 +++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 0320ce8..fd3dad8 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -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/**'], diff --git a/.drone.yml b/.drone.yml index 80f64ba..382957f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 @@ -99,6 +115,6 @@ depends_on: --- kind: signature -hmac: 164cdfa005c1e7df5bc4dabf7798639d536d9dfc2597bfe808a9ada900503c70 +hmac: b03338947d1b08b875e8743884aa9627e05094b5bfb39f1a96756222b10fea52 ...