mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
Github actions checkout v3.1.0 and setup-python v4.3.0 use deprecated Node.js 16. Bumping version to checkout v4.1.1 and setup-python v5.1.0 fixes the workflows, as both use the recommended Node.js 20. The checkout depth has been set to 1 (shallow copy) for all tasks that do not require git history to be available.
91 lines
2.2 KiB
YAML
91 lines
2.2 KiB
YAML
---
|
|
name: Run Linters
|
|
on:
|
|
- push
|
|
- pull_request
|
|
jobs:
|
|
ansible_lint:
|
|
name: Verify ansible-lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.1
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-python@v5.1.0
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Run ansible-lint
|
|
run: |
|
|
pip install "ansible-core>=2.16,<2.17" 'ansible-lint==6.22'
|
|
utils/build-galaxy-release.sh -ki
|
|
cd .galaxy-build
|
|
ansible-lint --profile production --exclude tests/integration/ --exclude tests/unit/ --parseable --nocolor
|
|
|
|
yamllint:
|
|
name: Verify yamllint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.1
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-python@v5.1.0
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Run yaml-lint
|
|
uses: ibiqlik/action-yamllint@v3.1.1
|
|
|
|
pydocstyle:
|
|
name: Verify pydocstyle
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.1
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-python@v5.1.0
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Run pydocstyle
|
|
run: |
|
|
pip install pydocstyle
|
|
pydocstyle
|
|
|
|
flake8:
|
|
name: Verify flake8
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.1
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-python@v5.1.0
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Run flake8
|
|
run: |
|
|
pip install flake8 flake8-bugbear
|
|
flake8
|
|
|
|
pylint:
|
|
name: Verify pylint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.1
|
|
with:
|
|
fetch-depth: 1
|
|
- uses: actions/setup-python@v5.1.0
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Run pylint
|
|
run: |
|
|
pip install 'pylint>=3.0'
|
|
pylint plugins roles --disable=import-error
|
|
|
|
shellcheck:
|
|
name: Shellcheck
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.1
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Run ShellCheck
|
|
uses: ludeeus/action-shellcheck@master
|