Skip to content

feat: add github action defaults + fix ansible code #158

feat: add github action defaults + fix ansible code

feat: add github action defaults + fix ansible code #158

Workflow file for this run

---
name: molecule
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
permissions: read-all
jobs:
molecule-checks:
name: Molecule checks
runs-on: ubuntu-latest
strategy:
matrix:
distro:
- ubuntu2204
- ubuntu2004
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: ${{ github.event.repository.name }}
- name: Set up Python 3.
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.x"
- name: Install test dependencies
run: pip3 install ansible molecule-plugins[docker] docker
- name: Run tests
env:
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
MOLECULE_DISTRO: ${{ matrix.distro }}
run: |
cd "${GITHUB_REPOSITORY#*/}"
molecule test