From 15e0d1fd28ce7c890de26d518b63071ddef81ed6 Mon Sep 17 00:00:00 2001 From: AnsibleGuy Date: Wed, 28 Jun 2023 21:03:25 +0200 Subject: [PATCH] fix for lint-workflow --- .github/workflows/autolint.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autolint.yml b/.github/workflows/autolint.yml index 95545bf..5997396 100644 --- a/.github/workflows/autolint.yml +++ b/.github/workflows/autolint.yml @@ -37,10 +37,22 @@ jobs: run: pylint --recursive=y . shell: bash + - name: Running PyLint (*.py.j2) + run: | + if [ -f ".pylintrc_j2" ]; then j2_cnf=" --rcfile $(pwd)/.pylintrc_j2"; else j2_cnf=''; fi + find -type f -name *.py.j2 -print0 | xargs --no-run-if-empty -0 -n1 pylint${j2_cnf} + shell: bash + - name: Running YamlLint run: yamllint . shell: bash - - name: Running AnsibleLint - run: ansible-lint -c .ansible-lint.yml + - name: Preparing collection for AnsibleLint + run: | + mkdir -p /tmp/ansible_lint/roles + ln -s ${{ github.workspace }} /tmp/ansible_lint/roles + shell: bash + + - name: Running AnsibleLint + run: ANSIBLE_ROLES_PATH=/tmp/ansible_lint/roles/ ansible-lint -c .ansible-lint.yml shell: bash