Skip to content

Commit

Permalink
Update upon review
Browse files Browse the repository at this point in the history
Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis authored and ssbarnea committed Aug 16, 2024
1 parent f58227d commit 1be75de
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 11 deletions.
29 changes: 27 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ Contributions are welcome, and they are greatly appreciated! Every little bit he
Every new feature should be tested and documented.
New source plugins or source filters will be evaluated for inclusion in the collection and might be rejected. Please consider the option of creating a new collection for your plugins if it is not a good fit for this collection.

If you are new here, read the [Quick-start development guide first](https://docs.ansible.com/ansible/devel/community/create_pr_quick_start.html).

## Code of Conduct
The ansible.eda collection follows the Ansible project's [Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html). Please read and familiarize yourself with this document.

## Submitting Issues
All software has bugs, and the amazon.aws collection is no exception. When you find a bug, you can help tremendously by telling us [about it](https://github.com/ansible/event-driven-ansible/issues/new/choose).

If you should discover that the bug you're trying to file already exists in an issue, you can help by verifying the behavior of the reported bug with a comment in that issue, or by reporting any additional information

## Writing New Code

## Cloning

Due to ansible-test own requirements, you must clone the repository into
Expand All @@ -28,6 +40,19 @@ Pre-commit is now set up to run each time you create a new commit. If you wish t
pre-commit run --all
```

# CI testing

This collection uses GitHub Actions to run Sanity, Integration and Units to validate its content.

# Adding tests

When fixing a bug, first reproduce it by adding a task as reported to a suitable file under the tests/integration/targets/<module_name>/tasks/ directory and run the integration tests as described below. The same is relevant for new features.

It is not necessary but if you want you can also add unit tests to a suitable file under the tests/units/ directory and run them as described below.

# Checking your code locally
It will make your and other people's life a bit easier if you run the tests locally and fix all failures before pushing. If you're unable to run the tests locally, please create your PR as a draft to avoid reviewers being added automatically.

## Running tests for source plugins

Running the tests requires `ansible-rulebook` to be installed. Please review the [ansible-rulebook requirements](https://ansible-rulebook.readthedocs.io/en/stable/installation.html#requirements), but do not install `ansible-rulebook` manually. It will be installed via the test requirements.
Expand All @@ -47,15 +72,15 @@ We recommend setting up a Python virtual environment to install the test depende

pip install -r test_requirements.txt

### Sanity and Unit tests
## Sanity and Unit tests

Sanity and unity tests can easily be run via tox:

```shell
tox -e py
```

### Integration tests
## Integration tests

Integration tests require the addition of [docker](https://docs.docker.com/engine/install/) or [podman](https://podman.io/getting-started/installation).

Expand Down
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ This collection requires Python 3.9 or greater.

This collection requires ansible-rulebook 1.0.0 or greater.


## Installation

The ansible.eda collection can be installed with Ansible Galaxy command-line tool:
Expand Down Expand Up @@ -72,11 +71,29 @@ Refer the following for more details.

## Use Cases

TBA

## Testing
You can either call modules, rulebooks and playbook by their Fully Qualified Collection Name (FQCN), such as ansible.eda.activation, or you can call modules by their short name if you list the ansible.eda collection in the playbook's collections keyword:

TBA
```
---
- name: Create a rulebook activation
ansible.eda.activation:
name: "Example Activation"
description: "Example Activation description"
project: "Example Project"
rulebook_name: "basic_short.yml"
decision_environment_name: "Example Decision Environment"
enabled: False
awx_token_id: 1
- name: Get information about the rulebook activation
ansible.eda.activation_info:
name: "Example Activation"
- name: Delete rulebook activation
ansible.eda.activation:
name: "Example Activation"
state: absent
```

## Contributing

Expand All @@ -88,10 +105,6 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.
- [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) - Details on contributing to Ansible
- [Contributing to Collections](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections) - How to check out collection git repositories correctly

## Support

TBA

## Release notes

See the [raw generated changelog](https://github.com/ansible/event-driven-ansible/tree/main/CHANGELOG.rst).
Expand Down

0 comments on commit 1be75de

Please sign in to comment.