Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] GitHub Checks with ansible-test #1

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ jobs:

# Install the head of the given branch (devel, stable-2.10)
- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
run: pip install https://github.com/gundalow/ansible/archive/github_checks.tar.gz --disable-pip-version-check

# run ansible-test sanity inside of Docker.
# The docker container has all the pinned dependencies that are required.
# Explicity specify the version of Python we want to test
#
# Call without --color
- name: Run sanity tests
run: ansible-test sanity --docker -v --color --python ${{ matrix.python }}
run: ansible-test sanity --docker -v --python ${{ matrix.python }}
working-directory: ./ansible_collections/community/zabbix
132 changes: 132 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
/tests/output/
/changelogs/.plugin-cache.yaml

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
14 changes: 14 additions & 0 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace: gundalow
name: ghatesting
version: 0.1.0
readme: README.md
authors:
- Ansible (https://github.com/ansible)
description: null
license_file: COPYING
tags: [community]
repository: https://github.com/ansible-collections/community.general
documentation: https://docs.ansible.com/ansible/latest/collections/community/general/
homepage: https://github.com/ansible-collections/community.general
issues: https://github.com/ansible-collections/community.general/issues
#type: flatmap
8 changes: 2 additions & 6 deletions plugins/modules/zabbix_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
- "zabbix-api >= 0.5.4"

options:
name:
description:
- Name of the action
required: true
event_source:
description:
- Type of events that the action will handle.
Expand All @@ -46,7 +42,7 @@
status:
description:
- Status of the action.
choices: ['enabled', 'disabled']
choices: ['enabled', 'disa']
default: 'enabled'
pause_in_maintenance:
description:
Expand Down Expand Up @@ -1971,7 +1967,7 @@ def main():
subject=dict(type='int', required=False),
message=dict(type='str', required=False),
send_to_groups=dict(type='list', required=False),
send_to_users = dict(type='list', required=True),
send_to_users = dict(type='list', required=True),
),
required_if=[
['type', 'remote_command', ['command_type']],
Expand Down
12 changes: 12 additions & 0 deletions tests/sanity/ignore-2.11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
plugins/modules/zabbix_action.py validate-modules:doc-elements-mismatch
plugins/modules/zabbix_action.py validate-modules:doc-required-mismatch
plugins/modules/zabbix_action.py validate-modules:invalid-argument-name
plugins/modules/zabbix_action.py validate-modules:missing-suboption-docs
plugins/modules/zabbix_action.py validate-modules:nonexistent-parameter-documented
plugins/modules/zabbix_action.py validate-modules:parameter-list-no-elements
plugins/modules/zabbix_action.py validate-modules:parameter-type-not-in-doc
plugins/modules/zabbix_action.py validate-modules:undocumented-parameter
plugins/modules/zabbix_maintenance.py validate-modules:doc-elements-mismatch
plugins/modules/zabbix_maintenance.py validate-modules:parameter-list-no-elements
plugins/doc_fragments/zabbix.py future-import-boilerplate
plugins/doc_fragments/zabbix.py metaclass-boilerplate