Skip to content

Move molecule config for playbooks into playbooks/ folder #39

Move molecule config for playbooks into playbooks/ folder

Move molecule config for playbooks into playbooks/ folder #39

name: Test install_xnat playbook
on:
pull_request:
paths:
- "roles/xnat/**"
- "roles/xnat_container_service/**"
- "playbooks/install_xnat.yml"
- "playbooks/install_container_service.yml"
- ".github/workflows/molecule-install-xnat.yml"
release:
types: [published]
jobs:
molecule:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
scenario:
- centos7_xnat
- rocky9_xnat
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
steps:
- name: Check out the codebase
uses: actions/checkout@v4
with:
path: ansible_collections/mirsg/infrastructure
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install test dependencies
run: |
sudo apt-get update && sudo apt-get -y install rsync
python3 -m pip install --upgrade pip
python3 -m pip install ansible molecule molecule-plugins[docker] docker requests
- name: Test with molecule
run: |
cd ansible_collections/mirsg/infrastructure/playbooks
molecule converge --scenario-name "${{ matrix.scenario }}"