15
15
16
16
jobs :
17
17
lint :
18
- runs-on : ubuntu-20.04
18
+ runs-on : ubuntu-latest
19
19
steps :
20
20
- name : checkout
21
21
uses : actions/checkout@v4
22
22
- name : ansible-lint
23
23
uses : ansible-community/ansible-lint-action@main
24
24
25
- python-3-9 :
25
+ molecule :
26
26
needs :
27
27
- lint
28
- runs-on : ubuntu-20.04
29
- container :
30
- image : python:3.9
28
+ runs-on : ubuntu-latest
31
29
strategy :
32
30
fail-fast : false
33
31
matrix :
34
- config :
32
+ distro :
35
33
- image : " enterpriselinux"
36
34
tag : " latest"
37
35
- image : " debian"
42
40
tag : " 40"
43
41
- image : " fedora"
44
42
tag : " latest"
45
- - image : " fedora"
46
- tag : " rawhide"
47
43
- image : " ubuntu"
48
44
tag : " latest"
49
45
- image : " ubuntu"
@@ -53,98 +49,46 @@ jobs:
53
49
steps :
54
50
- name : checkout
55
51
uses : actions/checkout@v4
52
+ with :
53
+ path : ansible-role-rundeck
54
+
55
+ - name : Set up Python
56
+ uses : actions/setup-python@v5
57
+ with :
58
+ python-version : " 3.13"
56
59
57
- - name : molecule
60
+ - name : Configure Docker for systemd
58
61
run : |
59
- apt-get update -qq
60
- apt-get -y -qq install yamllint docker.io
61
- pip install --no-cache-dir tox
62
- if [ -f tox.ini ] ; then tox ; fi
63
- if [ ! -f tox.ini ] ; then pip install -r requirements.yml ; pip install ansible-lint ansible-core ; molecule test ; fi
64
- env :
65
- image : ${{ matrix.config.image }}
66
- tag : ${{ matrix.config.tag }}
67
- python-3-10 :
68
- needs :
69
- - lint
70
- runs-on : ubuntu-20.04
71
- container :
72
- image : python:3.10
73
- strategy :
74
- fail-fast : false
75
- matrix :
76
- config :
77
- - image : " enterpriselinux"
78
- tag : " latest"
79
- - image : " debian"
80
- tag : " latest"
81
- - image : " debian"
82
- tag : " bullseye"
83
- - image : " fedora"
84
- tag : " 40"
85
- - image : " fedora"
86
- tag : " latest"
87
- - image : " fedora"
88
- tag : " rawhide"
89
- - image : " ubuntu"
90
- tag : " latest"
91
- - image : " ubuntu"
92
- tag : " jammy"
93
- - image : " ubuntu"
94
- tag : " focal"
95
- steps :
96
- - name : checkout
97
- uses : actions/checkout@v4
62
+ sudo mkdir -p /etc/docker
63
+ echo '{
64
+ "features": {
65
+ "buildkit": true
66
+ },
67
+ "exec-opts": ["native.cgroupdriver=systemd"]
68
+ }' | sudo tee /etc/docker/daemon.json
69
+ sudo systemctl restart docker || true
98
70
99
- - name : molecule
71
+ - name : Install Docker
72
+ uses : docker/setup-buildx-action@v3
73
+
74
+ - name : Install dependencies
100
75
run : |
101
- apt-get update -qq
102
- apt-get -y -qq install yamllint docker.io
103
- pip install --no-cache-dir tox
104
- if [ -f tox.ini ] ; then tox ; fi
105
- if [ ! -f tox.ini ] ; then pip install -r requirements.yml ; pip install ansible-lint ansible-core ; molecule test ; fi
106
- env :
107
- image : ${{ matrix.config.image }}
108
- tag : ${{ matrix.config.tag }}
109
- python-3-13 :
110
- needs :
111
- - lint
112
- runs-on : ubuntu-20.04
113
- container :
114
- image : python:3.13
115
- strategy :
116
- fail-fast : false
117
- matrix :
118
- config :
119
- - image : " enterpriselinux"
120
- tag : " latest"
121
- - image : " debian"
122
- tag : " latest"
123
- - image : " debian"
124
- tag : " bullseye"
125
- - image : " fedora"
126
- tag : " 40"
127
- - image : " fedora"
128
- tag : " latest"
129
- - image : " fedora"
130
- tag : " rawhide"
131
- - image : " ubuntu"
132
- tag : " latest"
133
- - image : " ubuntu"
134
- tag : " jammy"
135
- - image : " ubuntu"
136
- tag : " focal"
137
- steps :
138
- - name : checkout
139
- uses : actions/checkout@v4
76
+ python -m pip install --upgrade pip
77
+ pip install ansible-lint molecule molecule-plugins[docker] ansible-core
78
+ if [ -f ansible-role-rundeck/requirements.txt ]; then pip install -r ansible-role-rundeck/requirements.txt; fi
79
+ if [ -f ansible-role-rundeck/requirements.yml ]; then ansible-galaxy install -r ansible-role-rundeck/requirements.yml; fi
80
+
81
+ # Create proper role directory structure for molecule
82
+ mkdir -p ~/.ansible/roles
83
+ ln -s ${GITHUB_WORKSPACE}/ansible-role-rundeck ~/.ansible/roles/robertdebock.rundeck
140
84
141
- - name : molecule
85
+ - name : Test with molecule
142
86
run : |
143
- apt-get update -qq
144
- apt-get -y -qq install yamllint docker.io
145
- pip install --no-cache-dir tox
146
- if [ -f tox.ini ] ; then tox ; fi
147
- if [ ! -f tox.ini ] ; then pip install -r requirements.yml ; pip install ansible-lint ansible-core ; molecule test ; fi
87
+ cd ansible-role-rundeck
88
+ molecule test
148
89
env :
149
- image : ${{ matrix.config.image }}
150
- tag : ${{ matrix.config.tag }}
90
+ PY_COLORS : 1
91
+ ANSIBLE_FORCE_COLOR : 1
92
+ ANSIBLE_ROLES_PATH : ~/.ansible/roles:${GITHUB_WORKSPACE}/ansible-role-rundeck
93
+ image : ${{ matrix.distro.image }}
94
+ tag : ${{ matrix.distro.tag }}
0 commit comments