Skip to content

Commit

Permalink
Merge pull request #2 from adfinis/molecule
Browse files Browse the repository at this point in the history
feat: add reusable molecule workflow
  • Loading branch information
maxthier authored Nov 28, 2024
2 parents bf721ca + 5b3250f commit 78a9685
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/molecule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
name: Run Molecule

on:
workflow_call:
inputs:
systems:
required: false
type: string
default: |
{
"config": [
{
"image": "debian",
"tag": "bookworm"
},
{
"image": "debian",
"tag": "bullseye"
},
{
"image": "fedora",
"tag": "40"
},
{
"image": "fedora",
"tag": "39"
},
{
"image": "ubuntu",
"tag": "noble"
},
{
"image": "ubuntu",
"tag": "jammy"
}
]
}
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: ansible-lint
uses: ansible-community/ansible-lint-action@main
test:
needs:
- lint
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.systems) }}
steps:
- name: checkout
uses: actions/checkout@v4

- name: disable apparmor for mysql
run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/

- name: parse apparmor for mysql
run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld

- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: molecule
run: molecule test
env:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}

0 comments on commit 78a9685

Please sign in to comment.