File tree Expand file tree Collapse file tree 4 files changed +37
-24
lines changed
molecule/tls-and-basic-auth Expand file tree Collapse file tree 4 files changed +37
-24
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,12 @@ jobs:
1616 - name : ' Set up Python 3'
1717 uses : ' actions/setup-python@v5'
1818 with :
19- python-version : ' 3.x'
20-
21- - name : ' Install linters'
22- run : pip3 install ansible-core==2.16.7 ansible-lint==24.5.0 yamllint==1.35.1
19+ python-version : ' 3.12'
2320
2421 - name : ' Run linters'
2522 run : |
26- yamllint .
27- ansible- lint
23+ pip3 install --no-cache-dir tox
24+ tox -e lint
2825
2926 molecule :
3027 name : ' Molecule'
@@ -52,12 +49,14 @@ jobs:
5249 - name : ' Checkout the codebase'
5350 uses : ' actions/checkout@v4'
5451
55- - name : ' Testing an Ansible role with Molecule '
56- uses : ' gofrolist/molecule-action@v2 '
52+ - name : ' Set up Python 3 '
53+ uses : ' actions/setup-python@v5 '
5754 with :
58- molecule_command : ' test'
59- molecule_args : --scenario-name ${{ matrix.scenario }}
55+ python-version : ' 3.12'
56+
57+ - name : ' Testing an Ansible role with Molecule'
58+ run : |
59+ pip3 install --no-cache-dir tox
60+ tox -- test -s ${{ matrix.scenario }}
6061 env :
61- PY_COLORS : ' 1'
62- ANSIBLE_FORCE_COLOR : ' 1'
6362 TAG : ${{ matrix.distro }}
Original file line number Diff line number Diff line change 1616 - name : ' Install the dependencies for basic authentication and certificate generation'
1717 ansible.builtin.pip :
1818 name :
19+ - ' bcrypt==4.0.1'
1920 - ' cryptography'
20- - ' passlib[bcrypt] '
21+ - ' passlib'
2122
2223 - name : ' Create a private key (RSA, 4096 bits)'
2324 community.crypto.openssl_privatekey :
Original file line number Diff line number Diff line change 1- ansible-lint == 6.*
2- molecule == 5.*
1+ molecule == 24.*
32molecule-plugins[docker] == 23.*
Original file line number Diff line number Diff line change 11[tox]
22min_version = 4.0
3- env_list = ansible{7,8}
3+ env_list = ansible-core2.16
44
55[testenv]
6+ basepython = python3.12
7+
8+ [testenv:lint]
69deps =
7- -rtox-requirements.txt
8- ansible7: ansible == 7 .*
9- ansible8: ansible == 8.*
10+ ansible-core == 2.16.*
11+ ansible-lint == 24 .*
12+ yamllint
1013
11- commands = molecule test
14+ commands =
15+ yamllint .
16+ ansible-lint
1217
13- setenv =
14- PY_COLORS =1
15- ANSIBLE_FORCE_COLOR =1
16- TOX_ENVNAME =-{envname}
18+ [testenv:ansible-core{2.15,2.16,2.17}]
19+ deps =
20+ -rtox-requirements.txt
21+ ansible-core2.15: ansible-core ==2.15.*
22+ ansible-core2.16: ansible-core ==2.16.*
23+ ansible-core2.17: ansible-core ==2.17.*
24+
25+ commands = molecule {posargs: test}
1726
1827passenv =
1928 NAMESPACE
2029 IMAGE
2130 TAG
31+
32+ setenv =
33+ PY_COLORS =1
34+ ANSIBLE_FORCE_COLOR =1
35+ TOX_ENVNAME =-{envname}
You can’t perform that action at this time.
0 commit comments