-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (57 loc) · 1.93 KB
/
test-role-mysql_open_files_limit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
name: Test role mysql_open_files_limit
"on":
workflow_dispatch:
push:
paths:
- '.github/workflows/test-role-mysql_open_files_limit.yml'
- 'molecule/delegated/*'
- 'molecule/mysql_open_files_limit/**'
- 'roles/mysql_open_files_limit/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/test-role-mysql_open_files_limit.yml'
- 'molecule/delegated/*'
- 'molecule/mysql_open_files_limit/**'
- 'roles/mysql_open_files_limit/**'
jobs:
test-role-mysql_open_files_limit:
runs-on: ubuntu-latest
env:
ANSIBLE_ROLE: mysql_open_files_limit
strategy:
max-parallel: 4
matrix:
ansible-version: ['8.4.0']
python-version: ['3.10']
docker-image: ['ubuntu:22.04']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
# NOTE: Technically, Molecule supports variable interpolation in molecule.yml.
# For reasons that are not really comprehensible, however, it does not
# work here. Hence this workaround.
- name: Prepare molecule.yml
run: |
sed -i "s/\${DOCKER_IMAGE}/${{ matrix.docker-image }}/g" molecule/delegated/molecule.yml
sed -i "s/\${ANSIBLE_ROLE}/${{ env.ANSIBLE_ROLE }}/g" molecule/delegated/molecule.yml
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r molecule/requirements.txt
python3 -m pip install ansible~=${{ matrix.ansible-version }}
- name: Run molecule
run: molecule test -s delegated
- name: Cleanup molecule
run: molecule destroy -s delegated
if: ${{ always() }}