Skip to content

Add molecule workflows #3

Add molecule workflows

Add molecule workflows #3

Workflow file for this run

---
name: Ansible deployment
on:
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
env:
COLLECTION_NAMESPACE: tbauriedel
COLLECTION_NAME: gographite
strategy:
matrix:
distro: ['rockylinux8', 'ubuntu2204', 'debian12']
scenario: ['carbonapi', 'go-carbon']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- 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: Test with molecule
run: |
ansible --version
molecule --version
molecule test -s ${{ matrix.scenario }}
env:
MOLECULE_DISTRO: ${{ matrix.distro }}