Skip to content
Snippets Groups Projects
Unverified Commit 670740bd authored by Thomas Woerner's avatar Thomas Woerner Committed by GitHub
Browse files

Merge pull request #999 from rjeffman/update_tool_versions

Update development and Github workflow tools.
parents 82e176af 6da61104
No related branches found
No related tags found
No related merge requests found
...@@ -4,8 +4,8 @@ on: ...@@ -4,8 +4,8 @@ on:
- push - push
- pull_request - pull_request
jobs: jobs:
check_docs_29: check_docs_oldest_supported:
name: Check Ansible Documentation with Ansible 2.9. name: Check Ansible Documentation with ansible-core 2.12.
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3.1.0 - uses: actions/checkout@v3.1.0
...@@ -14,15 +14,15 @@ jobs: ...@@ -14,15 +14,15 @@ jobs:
- uses: actions/setup-python@v4.3.0 - uses: actions/setup-python@v4.3.0
with: with:
python-version: '3.x' python-version: '3.x'
- name: Install Ansible 2.9 - name: Install Ansible 2.12
run: | run: |
python -m pip install "ansible < 2.10" python -m pip install "ansible-core >=2.12,<2.13"
- name: Run ansible-doc-test - name: Run ansible-doc-test
run: | run: |
ANSIBLE_LIBRARY="." ANSIBLE_DOC_FRAGMENT_PLUGINS="." python utils/ansible-doc-test -v roles plugins ANSIBLE_LIBRARY="." ANSIBLE_DOC_FRAGMENT_PLUGINS="." python utils/ansible-doc-test -v roles plugins
check_docs_2_11: check_docs_previous:
name: Check Ansible Documentation with ansible-core 2.11. name: Check Ansible Documentation with ansible-core 2.13.
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3.1.0 - uses: actions/checkout@v3.1.0
...@@ -31,15 +31,15 @@ jobs: ...@@ -31,15 +31,15 @@ jobs:
- uses: actions/setup-python@v4.3.0 - uses: actions/setup-python@v4.3.0
with: with:
python-version: '3.x' python-version: '3.x'
- name: Install Ansible 2.11 - name: Install Ansible 2.13
run: | run: |
python -m pip install "ansible-core >=2.11,<2.12" python -m pip install "ansible-core >=2.13,<2.14"
- name: Run ansible-doc-test - name: Run ansible-doc-test
run: | run: |
ANSIBLE_LIBRARY="." ANSIBLE_DOC_FRAGMENT_PLUGINS="." python utils/ansible-doc-test -v roles plugins ANSIBLE_LIBRARY="." ANSIBLE_DOC_FRAGMENT_PLUGINS="." python utils/ansible-doc-test -v roles plugins
check_docs_2_12: check_docs_current:
name: Check Ansible Documentation with ansible-core 2.12. name: Check Ansible Documentation with ansible-core 2.14.
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3.1.0 - uses: actions/checkout@v3.1.0
...@@ -48,15 +48,14 @@ jobs: ...@@ -48,15 +48,14 @@ jobs:
- uses: actions/setup-python@v4.3.0 - uses: actions/setup-python@v4.3.0
with: with:
python-version: '3.x' python-version: '3.x'
- name: Install Ansible 2.12 - name: Install Ansible 2.14
run: | run: |
python -m pip install "ansible-core >=2.12,<2.13" python -m pip install "ansible-core >=2.14,<2.15"
- name: Run ansible-doc-test - name: Run ansible-doc-test
run: | run: |
python -m pip install "ansible-core >=2.12,<2.13"
ANSIBLE_LIBRARY="." ANSIBLE_DOC_FRAGMENT_PLUGINS="." python utils/ansible-doc-test -v roles plugins ANSIBLE_LIBRARY="." ANSIBLE_DOC_FRAGMENT_PLUGINS="." python utils/ansible-doc-test -v roles plugins
check_docs_latest: check_docs_ansible_latest:
name: Check Ansible Documentation with latest Ansible version. name: Check Ansible Documentation with latest Ansible version.
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
......
...@@ -16,7 +16,7 @@ jobs: ...@@ -16,7 +16,7 @@ jobs:
python-version: "3.x" python-version: "3.x"
- name: Run ansible-lint - name: Run ansible-lint
run: | run: |
pip install ansible-core==2.11.6 ansible-lint pip install "ansible-core >=2.14,<2.15" ansible-lint
find playbooks roles tests -name '*.yml' ! -name "env_*" ! -name "tasks_*" -exec ansible-lint --force-color {} \+ find playbooks roles tests -name '*.yml' ! -name "env_*" ! -name "tasks_*" -exec ansible-lint --force-color {} \+
env: env:
ANSIBLE_MODULE_UTILS: plugins/module_utils ANSIBLE_MODULE_UTILS: plugins/module_utils
...@@ -34,7 +34,7 @@ jobs: ...@@ -34,7 +34,7 @@ jobs:
with: with:
python-version: "3.x" python-version: "3.x"
- name: Run yaml-lint - name: Run yaml-lint
uses: ibiqlik/action-yamllint@v1 uses: ibiqlik/action-yamllint@v3.1.1
pydocstyle: pydocstyle:
name: Verify pydocstyle name: Verify pydocstyle
...@@ -63,7 +63,7 @@ jobs: ...@@ -63,7 +63,7 @@ jobs:
python-version: "3.x" python-version: "3.x"
- name: Run flake8 - name: Run flake8
run: | run: |
pip install flake8 pip install flake8 flake8-bugbear
flake8 flake8
pylint: pylint:
...@@ -78,7 +78,7 @@ jobs: ...@@ -78,7 +78,7 @@ jobs:
python-version: "3.x" python-version: "3.x"
- name: Run pylint - name: Run pylint
run: | run: |
pip install pylint==2.13.7 wrapt==1.14.0 pip install pylint==2.14.4 wrapt==1.14.0
pylint plugins roles --disable=import-error pylint plugins roles --disable=import-error
shellcheck: shellcheck:
......
--- ---
repos: repos:
- repo: https://github.com/ansible/ansible-lint.git - repo: https://github.com/ansible/ansible-lint.git
rev: v5.3.2 rev: v6.6.1
hooks: hooks:
- id: ansible-lint - id: ansible-lint
always_run: false always_run: false
...@@ -11,20 +11,20 @@ repos: ...@@ -11,20 +11,20 @@ repos:
entry: | entry: |
env ANSIBLE_LIBRARY=./plugins/modules ANSIBLE_MODULE_UTILS=./plugins/module_utils ANSIBLE_DOC_FRAGMENT_PLUGINS=./plugins/doc_fragments ansible-lint env ANSIBLE_LIBRARY=./plugins/modules ANSIBLE_MODULE_UTILS=./plugins/module_utils ANSIBLE_DOC_FRAGMENT_PLUGINS=./plugins/doc_fragments ansible-lint
- repo: https://github.com/adrienverge/yamllint.git - repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.1 rev: v1.28.0
hooks: hooks:
- id: yamllint - id: yamllint
files: \.(yaml|yml)$ files: \.(yaml|yml)$
- repo: https://github.com/pycqa/flake8 - repo: https://github.com/pycqa/flake8
rev: 3.9.2 rev: 5.0.3
hooks: hooks:
- id: flake8 - id: flake8
- repo: https://github.com/pycqa/pydocstyle - repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1 rev: 6.0.0
hooks: hooks:
- id: pydocstyle - id: pydocstyle
- repo: https://github.com/pycqa/pylint - repo: https://github.com/pycqa/pylint
rev: v2.12.2 rev: v2.14.4
hooks: hooks:
- id: pylint - id: pylint
args: args:
......
...@@ -1125,8 +1125,8 @@ class IPAAnsibleModule(AnsibleModule): ...@@ -1125,8 +1125,8 @@ class IPAAnsibleModule(AnsibleModule):
def ipa_get_domain(self): def ipa_get_domain(self):
"""Retrieve IPA API domain.""" """Retrieve IPA API domain."""
if not hasattr(self, "__ipa_api_domain"): if not hasattr(self, "__ipa_api_domain"):
setattr(self, "__ipa_api_domain", api_get_domain()) setattr(self, "__ipa_api_domain", api_get_domain()) # noqa: B010
return getattr(self, "__ipa_api_domain") return getattr(self, "__ipa_api_domain") # noqa: B009
@staticmethod @staticmethod
def ipa_get_realm(): def ipa_get_realm():
......
...@@ -126,7 +126,7 @@ class AutomountMap(IPAAnsibleModule): ...@@ -126,7 +126,7 @@ class AutomountMap(IPAAnsibleModule):
self.params_fail_used_invalid(invalid, state) self.params_fail_used_invalid(invalid, state)
def get_args(self, mapname, desc): # pylint: disable=no-self-use def get_args(self, mapname, desc):
# automountmapname is required for all automountmap operations. # automountmapname is required for all automountmap operations.
if not mapname: if not mapname:
self.fail_json(msg="automountmapname cannot be None or empty.") self.fail_json(msg="automountmapname cannot be None or empty.")
......
...@@ -280,7 +280,8 @@ class DNSZoneModule(IPAAnsibleModule): ...@@ -280,7 +280,8 @@ class DNSZoneModule(IPAAnsibleModule):
if any(invalid_ips): if any(invalid_ips):
self.fail_json(msg=error_msg % invalid_ips) self.fail_json(msg=error_msg % invalid_ips)
def is_valid_nsec3param_rec(self, nsec3param_rec): # pylint: disable=R0201 @staticmethod
def is_valid_nsec3param_rec(nsec3param_rec):
try: try:
part1, part2, part3, part4 = nsec3param_rec.split(" ") part1, part2, part3, part4 = nsec3param_rec.split(" ")
except ValueError: except ValueError:
......
-r requirements-tests.txt -r requirements-tests.txt
ipdb==0.13.4 ipdb==0.13.4
pre-commit pre-commit==2.20.0
flake8==4.0.1 flake8==5.0.3
flake8-bugbear==22.10.27 flake8-bugbear==22.10.27
pylint==2.13.7 pylint==2.14.4
wrapt >= 1.14.0 wrapt == 1.14.0
pydocstyle==6.0.0 pydocstyle==6.0.0
yamllint==1.26.3 yamllint==1.28.0
ansible-lint==5.3.2 ansible-lint==6.6.1
-r requirements.txt -r requirements.txt
pytest>=2.7 pytest==7.1.3
pytest-sourceorder>=0.5 pytest-sourceorder==0.6.0
pytest-split>=0.8.0 pytest-split>=0.8.0
pytest-custom_exit_code>=0.3.0 pytest-custom_exit_code>=0.3.0
pytest-testinfra>=5.0 pytest-testinfra==6.8.0
pytest-randomly==3.12.0
pyyaml>=3 pyyaml>=3
...@@ -84,7 +84,7 @@ def get_plugins_from_playbook(playbook): ...@@ -84,7 +84,7 @@ def get_plugins_from_playbook(playbook):
def import_mock(name, *args): def import_mock(name, *args):
"""Intercept 'import' calls and store module name.""" """Intercept 'import' calls and store module name."""
if not hasattr(import_mock, "call_list"): if not hasattr(import_mock, "call_list"):
setattr(import_mock, "call_list", set()) setattr(import_mock, "call_list", set()) # noqa: B010
import_mock.call_list.add(name) # pylint: disable=no-member import_mock.call_list.add(name) # pylint: disable=no-member
try: try:
# print("NAME:", name) # print("NAME:", name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment