Skip to content

Commit

Permalink
fix: workflow (#192)
Browse files Browse the repository at this point in the history
* fix: removed unsupported ansible versions and added new required python versions

* fix: check if quoting python version works

* fix: quote all python versions

* fix: deprecated features + remove python 3.12 + coverage version

* fix: dependencies

* fix: pin coverage dependency to 6.5.0
  • Loading branch information
jbisabel authored Nov 29, 2023
1 parent 513f566 commit bd5df2d
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 37 deletions.
52 changes: 30 additions & 22 deletions .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: 3.9
python-version: '3.10'

- name: Install ansible (${{ matrix.ansible-version }})
run: pip install pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check
Expand All @@ -48,19 +48,19 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
ansible-version: [stable-2.9, stable-2.10, stable-2.11, stable-2.12, stable-2.13, devel]
python-version: ['3.8', '3.9', '3.10', '3.11']
ansible-version: [stable-2.13, stable-2.14, stable-2.15, devel]
exclude:
- ansible-version: devel
python-version: 2.7
python-version: '3.8'
- ansible-version: devel
python-version: 3.8
- ansible-version: stable-2.12
python-version: 2.7
python-version: '3.9'
- ansible-version: stable-2.15
python-version: '3.8'
- ansible-version: stable-2.14
python-version: '3.8'
- ansible-version: stable-2.13
python-version: 2.7
- ansible-version: stable-2.9
python-version: 3.9
python-version: '3.11'

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:

- name: Generate coverage report
run: |
if [ "${{ matrix.ansible-version }}" == "devel" ]; then pip install coverage==6.5.0; fi
if [ "${{ matrix.ansible-version }}" == "stable-2.13" ]; then pip install coverage==4.5.4; fi
ansible-test coverage xml -v --group-by command --group-by version
working-directory: /home/runner/.ansible/collections/ansible_collections/infoblox/nios_modules/

Expand All @@ -108,21 +108,29 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
ansible-version: [stable-2.9, stable-2.10, stable-2.11, stable-2.12, stable-2.13, devel]
python-version: ['3.8', '3.9', '3.10', '3.11']
ansible-version: [stable-2.13, stable-2.14, stable-2.15, devel]
exclude:
- ansible-version: stable-2.9
python-version: 3.9
- ansible-version: devel
python-version: '3.8'
- ansible-version: devel
python-version: '3.9'
- ansible-version: stable-2.15
python-version: '3.8'
- ansible-version: stable-2.14
python-version: '3.8'
- ansible-version: stable-2.13
python-version: '3.11'
steps:
- name: Set up Python 3.9
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 3.9
python-version: ${{ matrix.python-version }}

- name: Check out code
uses: actions/checkout@v2

- name: Install ansible-base (${{ matrix.ansible }})
- name: Install ansible-base (${{ matrix.ansible-version }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check

- name: Download migrated collection artifacts
Expand Down Expand Up @@ -170,15 +178,15 @@ jobs:
strategy:
fail-fast: false
matrix:
ansible-version: [stable-2.9, stable-2.10, stable-2.11, stable-2.12, stable-2.13, devel]
ansible-version: [stable-2.13, stable-2.14, stable-2.15, devel]

steps:
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
# it is just required to run that once as "ansible-test sanity" in the docker image
# will run on all python versions it supports.
python-version: 3.9
python-version: '3.10'

- name: Install ansible (${{ matrix.ansible-version }}) version
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_a_record/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_a_record_idempotence.yml
- include_tasks: nios_a_record_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_aaaa_record/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_aaaa_record_idempotence.yml
- include_tasks: nios_aaaa_record_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_cname_record/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_cname_record_idempotence.yml
- include_tasks: nios_cname_record_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_dns_view/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_dns_view_idempotence.yml
- include_tasks: nios_dns_view_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_host_record/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_host_record_idempotence.yml
- include_tasks: nios_host_record_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_mx_record/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_mx_record_idempotence.yml
- include_tasks: nios_mx_record_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_naptr_record/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_naptr_record_idempotence.yml
- include_tasks: nios_naptr_record_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_network/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_network_idempotence.yml
- include_tasks: nios_network_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_network_view/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_network_view_idempotence.yml
- include_tasks: nios_network_view_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_ptr_record/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_ptr_record_idempotence.yml
- include_tasks: nios_ptr_record_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_srv_record/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_srv_record_idempotence.yml
- include_tasks: nios_srv_record_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_txt_record/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_txt_record_idempotence.yml
- include_tasks: nios_txt_record_idempotence.yml
2 changes: 1 addition & 1 deletion tests/integration/targets/nios_zone/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: nios_zone_idempotence.yml
- include_tasks: nios_zone_idempotence.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- include: prepare_nios_tests_idempotence.yml
- include_tasks: prepare_nios_tests_idempotence.yml
2 changes: 1 addition & 1 deletion tests/unit/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ pytest-xdist
mock
pytest-mock
pytest-cov
coverage==4.5.4
coverage==6.5.0

0 comments on commit bd5df2d

Please sign in to comment.