diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc2a702..8b4615a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,3 +25,31 @@ jobs: - name: Lint Ansible run: ansible-lint . + molecule: + name: Molecule + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + distro: + - ubuntu2204 + - ubuntu2004 + - ubuntu1804 + steps: + - name: Checkout codebase + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install test dependencies + run: pip install ansible molecule molecule-plugins[docker] pytest-testinfra docker + + - name: Run Molecule tests + run: molecule test --all + env: + PY_COLORS: '1' + ANSIBLE_FORCE_COLOR: '1' + MOLECULE_DISTRO: ${{ matrix.distro }}