Skip to content

Commit f8c508e

Browse files
Merge pull request #25 from Previnkumar-G/main
Workflow changes
2 parents 6e435cb + 575a768 commit f8c508e

File tree

5 files changed

+50
-13
lines changed

5 files changed

+50
-13
lines changed

.github/workflows/ansible-test.yml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8+
schedule:
9+
- cron: '0 3 * * *'
810

911
jobs:
1012
build:
@@ -35,10 +37,10 @@ jobs:
3537
name: collection
3638
path: .cache/collection-tarballs
3739

38-
###
39-
# Unit tests (OPTIONAL)
40-
#
41-
# https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html
40+
###
41+
# Unit tests (OPTIONAL)
42+
#
43+
# https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html
4244

4345
unit:
4446
name: Unit Tests
@@ -47,8 +49,22 @@ jobs:
4749
strategy:
4850
fail-fast: false
4951
matrix:
50-
python-version: [3.8, 3.9]
51-
ansible-version: [ stable-2.11, stable-2.12, stable-2.13]
52+
python-version: ["3.8", "3.9", "3.10", "3.11"]
53+
ansible-version: [stable-2.11, stable-2.12, stable-2.13, stable-2.14]
54+
exclude:
55+
# Python 3.11 is supported only from ansible-core 2.14 onwards
56+
- python-version: "3.11"
57+
ansible-version: stable-2.11
58+
- python-version: "3.11"
59+
ansible-version: stable-2.12
60+
- python-version: "3.11"
61+
ansible-version: stable-2.13
62+
# Ansible-core 2.11 doesn't support python v3.10
63+
- python-version: "3.10"
64+
ansible-version: stable-2.11
65+
# Ansible-core 2.14 supports only python versions 3.9, 3.10 and 3.11
66+
- python-version: "3.8"
67+
ansible-version: stable-2.14
5268

5369
steps:
5470
- name: Set up Python ${{ matrix.python-version }}
@@ -75,18 +91,19 @@ jobs:
7591
run: ansible-test units -v --color --python ${{ matrix.python-version }} --coverage
7692
working-directory: /home/runner/.ansible/collections/ansible_collections/dellemc/unity
7793

78-
###
79-
# Sanity tests (REQUIRED)
80-
#
81-
# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
94+
###
95+
# Sanity tests (REQUIRED)
96+
#
97+
# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
8298

8399
sanity:
84100
name: Sanity Tests
85101
runs-on: ubuntu-latest
86102
needs: [build]
87103
strategy:
104+
fail-fast: false
88105
matrix:
89-
ansible-version: [stable-2.11, stable-2.12, stable-2.13]
106+
ansible-version: [stable-2.11, stable-2.12, stable-2.13, stable-2.14]
90107

91108
steps:
92109
- name: Set up Python 3.9

plugins/modules/snapshotschedule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ def perform_module_operation(self):
882882

883883
if state == 'present' and type and schedule_details and\
884884
len(schedule_details['rules']) == 1:
885-
if(self.schedule_modify_required(schedule_details)):
885+
if (self.schedule_modify_required(schedule_details)):
886886
result['changed'] = self.modify_snapshot_schedule(
887887
id, schedule_details)
888888

tests/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ pytest
22
pytest-xdist
33
pytest-mock
44
pytest-cov
5+
pytest-forked
56
coverage==4.5.4
67
mock

tests/sanity/ignore-2.11.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ plugins/modules/host.py import-2.6
2020
plugins/modules/host.py import-2.7
2121
plugins/modules/interface.py import-2.6
2222
plugins/modules/interface.py import-2.7
23-
plugins/modules/interface.py validate-modules:missing-gplv3-license
23+
plugins/modules/interface.py validate-modules:missing-gplv3-license

tests/sanity/ignore-2.14.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
plugins/modules/consistencygroup.py validate-modules:missing-gplv3-license
2+
plugins/modules/filesystem.py validate-modules:missing-gplv3-license
3+
plugins/modules/filesystem_snapshot.py validate-modules:missing-gplv3-license
4+
plugins/modules/info.py validate-modules:missing-gplv3-license
5+
plugins/modules/host.py validate-modules:missing-gplv3-license
6+
plugins/modules/nasserver.py validate-modules:missing-gplv3-license
7+
plugins/modules/nfs.py validate-modules:missing-gplv3-license
8+
plugins/modules/smbshare.py validate-modules:missing-gplv3-license
9+
plugins/modules/snapshot.py validate-modules:missing-gplv3-license
10+
plugins/modules/snapshotschedule.py validate-modules:missing-gplv3-license
11+
plugins/modules/storagepool.py validate-modules:missing-gplv3-license
12+
plugins/modules/tree_quota.py validate-modules:missing-gplv3-license
13+
plugins/modules/user_quota.py validate-modules:missing-gplv3-license
14+
plugins/modules/volume.py validate-modules:missing-gplv3-license
15+
plugins/modules/cifsserver.py validate-modules:missing-gplv3-license
16+
plugins/modules/nfsserver.py validate-modules:missing-gplv3-license
17+
plugins/modules/host.py import-2.7
18+
plugins/modules/interface.py import-2.7
19+
plugins/modules/interface.py validate-modules:missing-gplv3-license

0 commit comments

Comments
 (0)