Refactor code structure for improved readability and maintainability
Some checks failed
Test Collection / Sanity Tests (Ansible devel) (push) Failing after 12s
Test Collection / Sanity Tests (Ansible stable-2.15) (push) Failing after 29s
Test Collection / Sanity Tests (Ansible stable-2.16) (push) Failing after 29s
Test Collection / Documentation Check (push) Successful in 7s
Test Collection / Unit Tests (push) Successful in 7s
Test Collection / Sanity Tests (Ansible stable-2.17) (push) Failing after 27s
Test Collection / Python Syntax Check (push) Successful in 6s
Test Collection / Build Collection (push) Failing after 8s
Test Collection / YAML and Ansible Lint (push) Successful in 11s
Some checks failed
Test Collection / Sanity Tests (Ansible devel) (push) Failing after 12s
Test Collection / Sanity Tests (Ansible stable-2.15) (push) Failing after 29s
Test Collection / Sanity Tests (Ansible stable-2.16) (push) Failing after 29s
Test Collection / Documentation Check (push) Successful in 7s
Test Collection / Unit Tests (push) Successful in 7s
Test Collection / Sanity Tests (Ansible stable-2.17) (push) Failing after 27s
Test Collection / Python Syntax Check (push) Successful in 6s
Test Collection / Build Collection (push) Failing after 8s
Test Collection / YAML and Ansible Lint (push) Successful in 11s
This commit is contained in:
@@ -12,22 +12,22 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
name: Publish Collection to Ansible Galaxy
|
name: Publish Collection to Ansible Galaxy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install Ansible
|
- name: Install Ansible
|
||||||
run: pip install ansible-core
|
run: pip install ansible-core
|
||||||
|
|
||||||
- name: Build collection
|
- name: Build collection
|
||||||
run: ansible-galaxy collection build
|
run: ansible-galaxy collection build
|
||||||
|
|
||||||
- name: Verify build
|
- name: Verify build
|
||||||
run: |
|
run: |
|
||||||
echo "Built collection:"
|
echo "Built collection:"
|
||||||
@@ -35,14 +35,14 @@ jobs:
|
|||||||
echo ""
|
echo ""
|
||||||
echo "Contents preview:"
|
echo "Contents preview:"
|
||||||
tar -tzf valid-nsupdate_zone-*.tar.gz | head -30
|
tar -tzf valid-nsupdate_zone-*.tar.gz | head -30
|
||||||
|
|
||||||
- name: Publish to Ansible Galaxy
|
- name: Publish to Ansible Galaxy
|
||||||
run: |
|
run: |
|
||||||
ansible-galaxy collection publish valid-nsupdate_zone-*.tar.gz --token ${{ secrets.GALAXY_API_TOKEN }}
|
ansible-galaxy collection publish valid-nsupdate_zone-*.tar.gz --token ${{ secrets.GALAXY_API_TOKEN }}
|
||||||
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
|
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
|
||||||
env:
|
env:
|
||||||
GALAXY_API_TOKEN: ${{ secrets.GALAXY_API_TOKEN }}
|
GALAXY_API_TOKEN: ${{ secrets.GALAXY_API_TOKEN }}
|
||||||
|
|
||||||
- name: Upload collection artifact
|
- name: Upload collection artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -19,25 +19,25 @@ jobs:
|
|||||||
- stable-2.16
|
- stable-2.16
|
||||||
- stable-2.17
|
- stable-2.17
|
||||||
- devel
|
- devel
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: ansible_collections/valid/nsupdate_zone
|
path: ansible_collections/valid/nsupdate_zone
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install Ansible
|
- name: Install Ansible
|
||||||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check
|
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check
|
||||||
|
|
||||||
- name: Install collection dependencies
|
- name: Install collection dependencies
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
working-directory: ansible_collections/valid/nsupdate_zone
|
working-directory: ansible_collections/valid/nsupdate_zone
|
||||||
|
|
||||||
- name: Run sanity tests
|
- name: Run sanity tests
|
||||||
run: ansible-test sanity --docker -v --color
|
run: ansible-test sanity --docker -v --color
|
||||||
working-directory: ansible_collections/valid/nsupdate_zone
|
working-directory: ansible_collections/valid/nsupdate_zone
|
||||||
@@ -45,16 +45,16 @@ jobs:
|
|||||||
syntax:
|
syntax:
|
||||||
name: Python Syntax Check
|
name: Python Syntax Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Check Python syntax
|
- name: Check Python syntax
|
||||||
run: |
|
run: |
|
||||||
python -m py_compile plugins/modules/nsupdate_zone.py
|
python -m py_compile plugins/modules/nsupdate_zone.py
|
||||||
@@ -64,22 +64,22 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build Collection
|
name: Build Collection
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install Ansible
|
- name: Install Ansible
|
||||||
run: pip install ansible-core
|
run: pip install ansible-core
|
||||||
|
|
||||||
- name: Build collection
|
- name: Build collection
|
||||||
run: ansible-galaxy collection build
|
run: ansible-galaxy collection build
|
||||||
|
|
||||||
- name: Verify tarball
|
- name: Verify tarball
|
||||||
run: |
|
run: |
|
||||||
if [ -f valid-nsupdate_zone-*.tar.gz ]; then
|
if [ -f valid-nsupdate_zone-*.tar.gz ]; then
|
||||||
@@ -90,7 +90,7 @@ jobs:
|
|||||||
echo "✗ Collection build failed"
|
echo "✗ Collection build failed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload collection artifact
|
- name: Upload collection artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -101,27 +101,27 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
name: YAML and Ansible Lint
|
name: YAML and Ansible Lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: ansible_collections/valid/nsupdate_zone
|
path: ansible_collections/valid/nsupdate_zone
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install ansible-core ansible-lint yamllint
|
pip install ansible-core ansible-lint yamllint
|
||||||
|
|
||||||
- name: Run yamllint
|
- name: Run yamllint
|
||||||
run: yamllint .
|
run: yamllint .
|
||||||
working-directory: ansible_collections/valid/nsupdate_zone
|
working-directory: ansible_collections/valid/nsupdate_zone
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Run ansible-lint
|
- name: Run ansible-lint
|
||||||
run: ansible-lint
|
run: ansible-lint
|
||||||
working-directory: ansible_collections/valid/nsupdate_zone
|
working-directory: ansible_collections/valid/nsupdate_zone
|
||||||
@@ -130,21 +130,21 @@ jobs:
|
|||||||
documentation:
|
documentation:
|
||||||
name: Documentation Check
|
name: Documentation Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: ansible_collections/valid/nsupdate_zone
|
path: ansible_collections/valid/nsupdate_zone
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install Ansible
|
- name: Install Ansible
|
||||||
run: pip install ansible-core
|
run: pip install ansible-core
|
||||||
|
|
||||||
- name: Validate module documentation
|
- name: Validate module documentation
|
||||||
run: |
|
run: |
|
||||||
ansible-doc valid.nsupdate_zone.nsupdate_zone
|
ansible-doc valid.nsupdate_zone.nsupdate_zone
|
||||||
@@ -153,24 +153,24 @@ jobs:
|
|||||||
unit:
|
unit:
|
||||||
name: Unit Tests
|
name: Unit Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: ansible_collections/valid/nsupdate_zone
|
path: ansible_collections/valid/nsupdate_zone
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install Ansible and dependencies
|
- name: Install Ansible and dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install ansible-core
|
pip install ansible-core
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
working-directory: ansible_collections/valid/nsupdate_zone
|
working-directory: ansible_collections/valid/nsupdate_zone
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: |
|
run: |
|
||||||
if [ -d "tests/unit/plugins/modules" ] && [ "$(ls -A tests/unit/plugins/modules)" ]; then
|
if [ -d "tests/unit/plugins/modules" ] && [ "$(ls -A tests/unit/plugins/modules)" ]; then
|
||||||
|
|||||||
BIN
valid-nsupdate_zone-1.2.0.tar.gz
Normal file
BIN
valid-nsupdate_zone-1.2.0.tar.gz
Normal file
Binary file not shown.
Reference in New Issue
Block a user