Skip to content

Merge pull request #38 from NETWAYS/chore/issue-template #100

Merge pull request #38 from NETWAYS/chore/issue-template

Merge pull request #38 from NETWAYS/chore/issue-template #100

Workflow file for this run

---
name: Molecule Test
on:
push:
tags:
- "*"
branches:
- "main"
pull_request:
jobs:
molecule_tests:
runs-on: ubuntu-latest
env:
COLLECTION_NAMESPACE: netways
COLLECTION_NAME: backup
strategy:
max-parallel: 4
matrix:
distro: [rockylinux8, rockylinux9, ubuntu2004, ubuntu2204]
scenario: [default]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.11
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-test.txt
- name: Install collection
run: |
mkdir -p ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE
cp -a ../ansible-collection-$COLLECTION_NAME ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
- name: Install geerlingguy.mysql roles
run: ansible-galaxy install geerlingguy.mysql
- name: Test with molecule
run: |
ansible --version
molecule --version
molecule --debug test -s ${{ matrix.scenario }}
env:
MOLECULE_DISTRO: ${{ matrix.distro }}
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"