ci: add python file checks to ci
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e5be5f67a3
commit
4f84033eb4
@ -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/**'],
|
||||
|
18
.drone.yml
18
.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
|
||||
@ -131,6 +147,6 @@ depends_on:
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: ad7291da9bba5693aef9216c6200d54622b3505141b2373e94607603d83e20e7
|
||||
hmac: 58ebbad265177f6c6d9f8ace8dcf0130962622ceefc831240450a87d82a77072
|
||||
|
||||
...
|
||||
|
@ -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_certbot_is_installed(host):
|
||||
|
Loading…
Reference in New Issue
Block a user