Skip to content

Commit 4e5a896

Browse files
authored
Merge pull request #365 from ScaleComputing/ci-gha
CI use GHA from ansible-network/github_actions
2 parents 53f709f + 22eab9e commit 4e5a896

File tree

184 files changed

+2308
-3103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+2308
-3103
lines changed

.ansible-lint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ exclude_paths:
99
- examples/vm_os_upgrade/main.yml
1010
- .github/workflows
1111
- changelogs
12+
- .tox

.github/workflows/linters.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
# from https://github.com/ansible-collections/amazon.aws/
3+
name: changelog and linters
4+
5+
# on: [workflow_call] # allow this workflow to be called from other workflows
6+
on:
7+
push:
8+
pull_request:
9+
10+
jobs:
11+
linters:
12+
uses: ansible-network/github_actions/.github/workflows/tox.yml@main
13+
with:
14+
envname: ""
15+
labelname: lint
16+
# 12

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ child-pipeline-gitlab-ci.yml
88
# developer instance, including credentials
99
tests/integration/integration_config.yml
1010
tests/integration/inventory
11+
collections
1112

1213
docs/build
1314
docs/source/modules

DEVELOPMENT.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,18 @@ sanity: ## Run sanity tests
147147
units: ## Run unit tests
148148
```
149149
150+
Tox based testing was added as we want to use linters from ansible-network/github_actions.
151+
Sample commands :
152+
153+
```
154+
tox list
155+
tox -e ansible-sanity
156+
tox -m lint
157+
tox -e flake8-lint,pylint
158+
tox -e black,flake8 # will reformat code
159+
tox -e ansible2.18-py312-with_constraints
160+
```
161+
150162
If you want to run tests with a single python version (e.g. not with whole test matrix), use:
151163
152164
```

plugins/doc_fragments/cloud_init.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# GNU General Public License v3.0+
55
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

7-
from __future__ import absolute_import, division, print_function
7+
from __future__ import absolute_import
8+
from __future__ import division
9+
from __future__ import print_function
810

911
__metaclass__ = type
1012

plugins/doc_fragments/cluster_instance.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# GNU General Public License v3.0+
55
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

7-
from __future__ import absolute_import, division, print_function
7+
from __future__ import absolute_import
8+
from __future__ import division
9+
from __future__ import print_function
810

911
__metaclass__ = type
1012

plugins/doc_fragments/endpoint.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# GNU General Public License v3.0+
55
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

7-
from __future__ import absolute_import, division, print_function
7+
from __future__ import absolute_import
8+
from __future__ import division
9+
from __future__ import print_function
810

911
__metaclass__ = type
1012

plugins/doc_fragments/force_reboot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# GNU General Public License v3.0+
55
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

7-
from __future__ import absolute_import, division, print_function
7+
from __future__ import absolute_import
8+
from __future__ import division
9+
from __future__ import print_function
810

911
__metaclass__ = type
1012

plugins/doc_fragments/machine_type.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# GNU General Public License v3.0+
55
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

7-
from __future__ import absolute_import, division, print_function
7+
from __future__ import absolute_import
8+
from __future__ import division
9+
from __future__ import print_function
810

911
__metaclass__ = type
1012

plugins/doc_fragments/vm_name.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# GNU General Public License v3.0+
55
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
66

7-
from __future__ import absolute_import, division, print_function
7+
from __future__ import absolute_import
8+
from __future__ import division
9+
from __future__ import print_function
810

911
__metaclass__ = type
1012

0 commit comments

Comments
 (0)