init attempt to introduce molecule tests via GHA #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Molecule-test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: null | |
jobs: | |
molecule: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
scenario: | |
- centos7 | |
- Debian10 | |
- debian11 | |
- fedora35 | |
- oraclelinux8 | |
- rockylinux8 | |
- ubuntu18.04 | |
- ubuntu2004 | |
- ubuntu2204 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: "${{ github.repository }}" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install ansible-lint molecule molecule-plugins[docker] docker flake8 flake8-bugbear flake8-docstrings flake8-import-order flake8-pylint pytest pytest-testinfra yamllint | |
- name: Molecule | |
uses: gofrolist/molecule-action@v2 | |
with: | |
molecule_command: test | |
molecule_args: --scenario-name ${{ matrix.scenario }} | |
env: | |
ANSIBLE_FORCE_COLOR: '1' |