molecule-tests #35
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: CI | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: ~ | |
jobs: | |
molecule: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
distro: | |
# - image: jrei/systemd-ubuntu:16.04 | |
# instance: systemd-ubuntu-16.04 | |
# - image: jrei/systemd-ubuntu:18.04 | |
# instance: systemd-ubuntu-18.04 | |
- image: jrei/systemd-ubuntu:20.04 | |
instance: systemd-ubuntu-20.04 | |
# - image: jrei/systemd-centos:7 | |
# instance: systemd-centos-7 | |
# - image: jrei/systemd-centos:8 | |
# instance: systemd-centos-8 | |
# - image: jrei/systemd-debian:9 | |
# instance: systemd-debian-9 | |
# - image: jrei/systemd-debian:10 | |
# instance: systemd-debian-10 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: '3.12' | |
- name: Install molecule | |
run: pip3 install ansible molecule molecule-docker | |
- name: Check Docker and if it is running | |
run: systemctl status docker | |
- name: Check docker | |
run: docker --version && docker ps -a | |
- name: Run molecule dependency | |
run: molecule dependency | |
env: | |
MOLECULE_DISTRO: ${{ matrix.distro.image }} | |
MOLECULE_INSTANCE_NAME: ${{ matrix.distro.instance }} | |
- name: Install ansible 7.5 and downgrade requests | |
run: pip3 install ansible==7.5 requests==2.31.0 | |
- name: Run molecule | |
run: molecule create | |
env: | |
MOLECULE_DISTRO: ${{ matrix.distro.image }} | |
MOLECULE_INSTANCE_NAME: ${{ matrix.distro.instance }} |