diff options
Diffstat (limited to 'ansible_collections/dellemc/enterprise_sonic/.github')
8 files changed, 286 insertions, 31 deletions
diff --git a/ansible_collections/dellemc/enterprise_sonic/.github/CODEOWNERS b/ansible_collections/dellemc/enterprise_sonic/.github/CODEOWNERS new file mode 100644 index 000000000..5a1377bdc --- /dev/null +++ b/ansible_collections/dellemc/enterprise_sonic/.github/CODEOWNERS @@ -0,0 +1,14 @@ +# CODEOWNERS +# +# documentation for this file can be found at: +# https://help.github.com/en/articles/about-code-owners + +# These are the default owners for the code and will +# be requested for review when someone opens a pull request. +# The order is alphabetical for easier maintenance. +# +# Kerry Meyer (kerry_meyer@dell.com) +# Shade Talabi (Shade_Talabi@Dell.com) + +# for all files: +* @kerry-meyer @stalabi1 diff --git a/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/ask_a_question.md b/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/ask_a_question.md new file mode 100644 index 000000000..aacce06a8 --- /dev/null +++ b/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/ask_a_question.md @@ -0,0 +1,11 @@ +--- +name: 💬 Ask a question +about: Ask usage questions here +title: "[QUESTION]:" +labels: type/question +assignees: '' + +--- +### How can the team help? + +**Details: ?**
\ No newline at end of file diff --git a/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/bug_report.yml b/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..65ce40653 --- /dev/null +++ b/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,116 @@ +--- +name: 🐛 Bug report +description: Create a report to help us improve. +title: "[BUG]: " +labels: ["type/bug", "needs-triage"] +body: + - type: markdown + attributes: + value: | + Thank you for taking the time to create this bug report. To better help us investigate this bug, provide the following information. + Verify first that your issue is not already reported on GitHub + Also test if the latest release and devel branch are affected too + Complete *all* sections as described, this form is processed automatically + - type: textarea + id: Description + attributes: + label: Bug Description + description: Provide a clear and concise summary about the bug. + validations: + required: true + - type: input + id: Product + attributes: + label: Product Name + description: Product Name + placeholder: | + Dell Enterprise SONiC / SONiC-OS etc + validations: + required: true + - type: input + id: component + attributes: + label: Component or Module Name + description: Write the short name of the module, plugin, task or feature below, use your best guess if unsure + placeholder: httpapi, cliconf, sonic_bgp, etc. + validations: + required: true + - type: input + id: ansible + attributes: + label: DellEMC Enterprise SONiC Ansible Collection Version + description: Provide the output from "ansible-galaxy collection list dellemc.enterprise_sonic" + placeholder: | + dellemc.enterprise_sonic 2.0.0 + validations: + required: true + - type: input + id: Productv + attributes: + label: SONiC Software Version + description: Provide the first line of "show version" output. + placeholder: | + SONiC Software Version + validations: + required: true + - type: textarea + id: device + attributes: + label: Configuration + description: Paste verbatim output from "ansible-config dump --only-changed" + placeholder: | + "ansible-config dump --only-changed" + validations: + required: true + - type: textarea + id: STEPS + attributes: + label: Steps to Reproduce + description: Describe exactly how to reproduce the problem, using a minimal test-case + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: Enter the clear and concise description about the expected behaviour. + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: Enter the clear and concise description about the actual behaviour. + validations: + required: true + - type: textarea + id: files + attributes: + label: Logs + description: Copy any relevant log output here or drop the log files in the text area. + Please be sure to remove all sensitive data such as IP addresses, host names, credentials, etc. + validations: + required: true + - type: textarea + id: screenshots + attributes: + label: Screenshots + description: Drop any relevant screenshots in the text area. + validations: + required: false + - type: input + id: ainfo + attributes: + label: Additional Information + description: Provide any additional information about the bug. + validations: + required: false + - type: markdown + attributes: + value: | + Community Note + * Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) + to the original issue to help the community and maintainers prioritize this request + * Please do not leave "+1" or other comments that do not add relevant new information or questions, + they generate extra noise for issue followers and do not help prioritize the request + * If you are interested in working on this issue or have submitted a pull request, please leave a comment
\ No newline at end of file diff --git a/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/config.yml b/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..ec4bb386b --- /dev/null +++ b/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false
\ No newline at end of file diff --git a/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/feature_request.md b/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..c414549ee --- /dev/null +++ b/ansible_collections/dellemc/enterprise_sonic/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,23 @@ +--- +name: 🚀 Feature Request +about: Suggest an idea for this project +title: "[FEATURE]:" +labels: type/feature-request, needs-triage +assignees: '' +--- +**Describe the solution you'd like** +Provide a clear and concise description about the new feature request. + +**Describe alternatives you've considered** +Provide a clear and concise description of any alternative solutions or features that you have considered. + +**Additional context** +Describe any relevant context or add any relevant screenshots about the feature request. + +**Community Note** + +* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) + to the original issue to help the community and maintainers prioritize this request +* Please do not leave "+1" or other comments that do not add relevant new information or questions, + they generate extra noise for issue followers and do not help prioritize the request +* If you are interested in working on this issue or have submitted a pull request, please leave a comment
\ No newline at end of file diff --git a/ansible_collections/dellemc/enterprise_sonic/.github/PULL_REQUEST_TEMPLATE.md b/ansible_collections/dellemc/enterprise_sonic/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..006a4eed2 --- /dev/null +++ b/ansible_collections/dellemc/enterprise_sonic/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,53 @@ +##### SUMMARY +<!--- Describe the change below, including rationale and design decisions --> + +##### GitHub Issues +List the GitHub issues impacted by this PR. If no Github issues are affected, please indicate this with "N/A". + +| GitHub Issue # | +| -------------- | +| | + + +##### ISSUE TYPE +<!--- Pick one below and delete the rest --> +- Bugfix Pull Request +- Docs Pull Request +- Feature Pull Request +- Test Pull Request + +##### COMPONENT NAME +<!--- Write the short name of the module, plugin, task or feature below --> + +##### OUTPUT +<!--- Paste the functionality test result below --> +```paste below + +``` +##### ADDITIONAL INFORMATION +<!--- Include additional information to help people understand the change here --> +<!--- A step-by-step reproduction of the problem is helpful if there is no related issue --> + +<!--- Paste verbatim command output below, e.g. before and after your change --> +```paste below + +``` +<!--- Measure the code coverage before and after the change by running the UT and ensure that the "coverage after the change" is not less than the coverage "before the change". Note that the unit testing coverage can be manually executed using the pytest tool or ansible-test tool. --> + +##### Checklist: + +- [ ] I have performed a self-review of my own code to ensure there are no formatting, linting, or security issues +- [ ] I have verified that new and existing unit tests pass locally with my changes +- [ ] I have not allowed coverage numbers to degenerate +- [ ] I have maintained at least 90% code coverage +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] I have maintained backward compatibility or have provided any relevant "breaking_changes" descriptions in a "fragment" file in the "changelogs/fragments" directory of this repository. +- [ ] I have provided a summary for this PR in valid "fragment" file format in the "changelogs/fragments" directory of this repository branch. Reference : [Ansible Change Log Document](https://docs.ansible.com/ansible/devel/community/development_process.html#changelogs-how-to) + +##### How Has This Been Tested? +Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration + +- [ ] Test A +- [ ] Test B diff --git a/ansible_collections/dellemc/enterprise_sonic/.github/workflows/ansible-test.yml b/ansible_collections/dellemc/enterprise_sonic/.github/workflows/ansible-test.yml index c2ae1dd09..3a5bbd9f6 100644 --- a/ansible_collections/dellemc/enterprise_sonic/.github/workflows/ansible-test.yml +++ b/ansible_collections/dellemc/enterprise_sonic/.github/workflows/ansible-test.yml @@ -7,36 +7,10 @@ on: # This ensures that even if there haven't been commits that we are still testing against latest version of ansible-test for each ansible-base version schedule: - cron: '0 6 * * *' + jobs: + changelog: + uses: ansible-network/github_actions/.github/workflows/changelog.yml@main + if: (github.event_name != 'schedule' && github.event_name != 'push' && !contains(github.event.pull_request.labels.*.name, 'new_resource_module')) sanity: - name: Sanity (${{ matrix.ansible }}) - strategy: - matrix: - ansible: - - stable-2.9 - - stable-2.10 - - stable-2.11 - - stable-2.12 - - stable-2.13 - - devel - runs-on: ubuntu-latest - steps: - - - name: Check out code - uses: actions/checkout@v1 - with: - path: ansible_collections/dellemc/enterprise_sonic - - - name: Set up Python 3.9 - uses: actions/setup-python@v1 - with: - python-version: 3.9 - - - name: Install ansible-base (${{ matrix.ansible }}) - run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check - - - name: Install ansible_collections.ansible.netcommon - run: ansible-galaxy collection install ansible.netcommon -p ../../ - - - name: Run sanity tests - run: ansible-test sanity --docker -v --color + uses: ansible-network/github_actions/.github/workflows/sanity.yml@main diff --git a/ansible_collections/dellemc/enterprise_sonic/.github/workflows/code-coverage.yml b/ansible_collections/dellemc/enterprise_sonic/.github/workflows/code-coverage.yml new file mode 100644 index 000000000..1f23d7a6e --- /dev/null +++ b/ansible_collections/dellemc/enterprise_sonic/.github/workflows/code-coverage.yml @@ -0,0 +1,63 @@ +name: Code coverage +on: + push: + pull_request: + +jobs: + codecoverage: + env: + PY_COLORS: "1" + source_directory: "./source" + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + ansible-version: + - stable-2.14 + python-version: + - "3.10" + runs-on: ${{ matrix.os }} + + name: "Code coverage py${{ matrix.python-version }} / ${{ matrix.os }} / ${{ matrix.ansible-version }}" + steps: + - name: Checkout the collection repository + uses: actions/checkout@v3 + with: + path: ${{ env.source_directory }} + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: "0" + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install ansible-core (${{ matrix.ansible-version }}) + run: python3 -m pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check + + - name: Read collection metadata from galaxy.yml + id: identify + uses: ansible-network/github_actions/.github/actions/identify_collection@main + with: + source_path: ${{ env.source_directory }} + + - name: Build and install the collection + uses: ansible-network/github_actions/.github/actions/build_install_collection@main + with: + install_python_dependencies: true + source_path: ${{ env.source_directory }} + collection_path: ${{ steps.identify.outputs.collection_path }} + tar_file: ${{ steps.identify.outputs.tar_file }} + + - name: Print the ansible version + run: ansible --version + + - name: Print the python dependencies + run: python3 -m pip list + + - name: Run code coverage tests + run: | + ansible-test units --python ${{ matrix.python-version }} --coverage --requirements + ansible-test coverage report + working-directory: ${{ steps.identify.outputs.collection_path }} |