Skip to content

Commit

Permalink
fix(ci): fix molecule for GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
adf-patrickha committed Jul 18, 2024
1 parent ce9b53e commit 9e1f021
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
39 changes: 18 additions & 21 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
#
# Ansible managed
#

name: Ansible Molecule

Expand All @@ -21,6 +18,7 @@ jobs:
uses: actions/checkout@v3
- name: ansible-lint
uses: ansible-community/ansible-lint-action@main

test:
needs:
- lint
Expand All @@ -33,35 +31,34 @@ jobs:
tag: "latest"
- image: "debian"
tag: "bullseye"
- image: "debian"
tag: "buster"
- image: "enterpriselinux"
tag: "7"
- image: "enterpriselinux"
tag: "8"
- image: "enterpriselinux"
tag: "latest"
- image: "fedora"
tag: "37"
- image: "fedora"
tag: "38"
- image: "opensuse"
tag: "latest"
tag: "39"
- image: "ubuntu"
tag: "latest"
- image: "ubuntu"
tag: "focal"
steps:
- name: checkout
uses: actions/checkout@v3
with:
path: "${{ github.repository }}"
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: molecule
uses: robertdebock/[email protected]

- 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 converge
env:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ platforms:
image: "${namespace:-robertdebock}/${image:-fedora}:${tag:-latest}"
command: /sbin/init
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: yes
pre_build_image: yes
provisioner:
Expand Down

0 comments on commit 9e1f021

Please sign in to comment.