fix ci yapf command if no python files found
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2021-06-08 00:14:04 +02:00
parent bf21f1a0a6
commit 928ea3b754
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 4 additions and 3 deletions

View File

@ -21,7 +21,7 @@ local PipelineLinting = {
},
commands: [
'pip install -qq yapf',
'yapf -dr ./',
'[ ! -z "$(find . -type f -name *.py)" ] && yapf -rd ./',
],
},
{

View File

@ -16,7 +16,7 @@ steps:
image: python:3.9
commands:
- pip install -qq yapf
- yapf -dr ./
- "[ ! -z \"$(find . -type f -name *.py)\" ] && yapf -rd ./"
environment:
PY_COLORS: 1
@ -147,6 +147,6 @@ depends_on:
---
kind: signature
hmac: a57deec8454606c10d1bf88110fe3a7096afa4294d741e34fb8fbe15df5578c6
hmac: b65a40c16f04371f45ae0b7294ec1199d82a9d1d5a0ba0fe5a7b2e6246041e77
...

View File

@ -2,6 +2,7 @@ import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")