Skip to content

Commit f9d3cce

Browse files
authored
Pipeline fixes and drop test support for ansible <= 2.12 (#43)
* Add ignore 2.18 * Add support for Ansible 2.17 and stable-2.17 in CI workflow * Update mock.py license header and import statements * Drop test support for Ansible 2.9 - 2.12 * add changelog fragment
1 parent 4890317 commit f9d3cce

File tree

6 files changed

+29
-36
lines changed

6 files changed

+29
-36
lines changed

.github/workflows/ansible-test.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,16 @@ jobs:
1717
strategy:
1818
matrix:
1919
ansible:
20-
- stable-2.9
21-
- stable-2.10
22-
- stable-2.11
23-
- stable-2.12
2420
- stable-2.13
2521
- stable-2.14
2622
- stable-2.15
2723
- stable-2.16
24+
- stable-2.17
2825
- devel
2926

3027
runs-on: >-
3128
${{ contains(fromJson(
32-
'["stable-2.9", "stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]'
29+
'["stable-2.13", "stable-2.14"]'
3330
), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
3431
steps:
3532

@@ -46,22 +43,19 @@ jobs:
4643
units:
4744
runs-on: >-
4845
${{ contains(fromJson(
49-
'["stable-2.9", "stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]'
46+
'["stable-2.13", "stable-2.14"]'
5047
), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
5148
name: Units (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
5249
strategy:
5350
# As soon as the first unit test fails, cancel the others to free up the CI queue
5451
fail-fast: true
5552
matrix:
5653
ansible:
57-
- stable-2.9
58-
- stable-2.10
59-
- stable-2.11
60-
- stable-2.12
6154
- stable-2.13
6255
- stable-2.14
6356
- stable-2.15
6457
- stable-2.16
58+
- stable-2.17
6559
- devel
6660

6761
steps:

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,13 @@ Every voice is important. If you have something on your mind, create an issue or
6565
## Tested with Ansible and the following Python versions
6666

6767
Tested Ansible versions:
68-
- 2.9
69-
- 2.10
70-
- 2.11
71-
- 2.12
7268
- 2.13
7369
- 2.14
7470
- 2.15
7571
- 2.16
7672
- devel
7773

7874
Tested Python versions:
79-
- 2.6
80-
- 2.7
81-
- 3.5
8275
- 3.6
8376
- 3.7
8477
- 3.8
@@ -90,6 +83,9 @@ Due to SAP licensing and hardware requirements, integration tests are momentaril
9083
The modules are tested manually against SAP systems until we found a solution or have some
9184
modules where we are able to execute integration test we decided to disable these tests.
9285

86+
The test support for Ansible versions 2.9 - 2.12 is disabled due to eol of these versions.
87+
The modules may work with these versions but are not tested.
88+
9389
## External requirements
9490

9591
For some modules the below requirements are needed on the host that executes a module.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
minor_changes:
2+
- Drop support for ansible <= 2.12
3+
- Add test for ansible 2.18 aka devel
4+
bugfixes:
5+
- Fix pipelines

tests/sanity/ignore-2.17.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ plugins/modules/sap_snote.py validate-modules:missing-gplv3-license # Licensed u
66
plugins/modules/sap_system_facts.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
77
plugins/modules/sap_task_list_execute.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
88
plugins/modules/sap_user.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
9-
plugins/modules/sapcar_extract.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
9+
plugins/modules/sapcar_extract.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
10+
tests/unit/compat/mock.py pylint:use-yield-from # suggested construct does not work with Python 2

tests/sanity/ignore-2.18.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
plugins/modules/sap_pyrfc.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
2+
plugins/modules/sap_company.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
3+
plugins/modules/sap_control_exec.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
4+
plugins/modules/sap_hdbsql.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
5+
plugins/modules/sap_snote.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
6+
plugins/modules/sap_system_facts.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
7+
plugins/modules/sap_task_list_execute.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
8+
plugins/modules/sap_user.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
9+
plugins/modules/sapcar_extract.py validate-modules:missing-gplv3-license # Licensed under Apache 2.0
10+
tests/unit/compat/mock.py pylint:use-yield-from # suggested construct does not work with Python 2

tests/unit/compat/mock.py

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
# (c) 2014, Toshio Kuratomi <[email protected]>
2-
#
3-
# This file is part of Ansible
4-
#
5-
# Ansible is free software: you can redistribute it and/or modify
6-
# it under the terms of the GNU General Public License as published by
7-
# the Free Software Foundation, either version 3 of the License, or
8-
# (at your option) any later version.
9-
#
10-
# Ansible is distributed in the hope that it will be useful,
11-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
# GNU General Public License for more details.
14-
#
15-
# You should have received a copy of the GNU General Public License
16-
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
1+
# Copyright (c) 2014, Toshio Kuratomi <[email protected]>
2+
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3+
# SPDX-License-Identifier: GPL-3.0-or-later
174

185
# Make coding more python3-ish
196
from __future__ import (absolute_import, division, print_function)
@@ -33,12 +20,12 @@
3320
# Allow wildcard import because we really do want to import all of mock's
3421
# symbols into this compat shim
3522
# pylint: disable=wildcard-import,unused-wildcard-import
36-
from unittest.mock import *
23+
from unittest.mock import * # noqa: F401, pylint: disable=unused-import
3724
except ImportError:
3825
# Python 2
3926
# pylint: disable=wildcard-import,unused-wildcard-import
4027
try:
41-
from mock import *
28+
from mock import * # noqa: F401, pylint: disable=unused-import
4229
except ImportError:
4330
print('You need the mock library installed on python2.x to run tests')
4431

0 commit comments

Comments
 (0)