diff --git a/.github/workflows/autolint.yml b/.github/workflows/autolint.yml new file mode 100644 index 0000000..95545bf --- /dev/null +++ b/.github/workflows/autolint.yml @@ -0,0 +1,46 @@ +--- + +name: AutoLint + +on: + push: + branches: [main, stable] + pull_request: + branches: [main, stable] + +jobs: + build: + strategy: + matrix: + python-version: [3.10] + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Switch to Current Branch + run: git checkout ${{ env.BRANCH }} + shell: bash + + - name: Install python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + pip install -r requirements_lint.txt + shell: bash + + - name: Running PyLint + run: pylint --recursive=y . + shell: bash + + - name: Running YamlLint + run: yamllint . + shell: bash + + - name: Running AnsibleLint + run: ansible-lint -c .ansible-lint.yml + shell: bash diff --git a/requirements_lint.txt b/requirements_lint.txt new file mode 100644 index 0000000..c48fa2e --- /dev/null +++ b/requirements_lint.txt @@ -0,0 +1,5 @@ +# pip requirements +yamllint +pylint +ansible-core +ansible-lint