CI: Add Arch Linux to the test matrix

Recently, there was a regression because a parameter has been introduced
which is only present for Red Hat and Debian systems. When adding other
Linux distributions to the test suite, errors like this might get caught
in the future.
This commit is contained in:
Andreas Motl 2022-05-16 19:55:43 +02:00
parent 5b8e39b38e
commit 241dae5ba4
2 changed files with 23 additions and 3 deletions

View File

@ -39,8 +39,10 @@ jobs:
name: Molecule name: Molecule
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false
matrix: matrix:
distro: distro:
- archlinux
- rockylinux8 - rockylinux8
- centos7 - centos7
- ubuntu2004 - ubuntu2004
@ -64,9 +66,24 @@ jobs:
- name: Install test dependencies. - name: Install test dependencies.
run: pip3 install ansible molecule[docker] docker run: pip3 install ansible molecule[docker] docker
- name: Provide MOLECULE_DISTRO to environment
run: echo "MOLECULE_DISTRO=${{ matrix.distro || 'centos7' }}" >> $GITHUB_ENV
- name: Run Molecule tests. - name: Run Molecule tests.
if: matrix.distro != 'archlinux'
run: molecule test run: molecule test
env: env:
PY_COLORS: '1' PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1' ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }} CI_IMAGE: geerlingguy/docker-${{ env.MOLECULE_DISTRO }}-ansible:latest
- name: Run Molecule tests on Arch Linux.
if: matrix.distro == 'archlinux'
run: molecule test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
# CI_IMAGE: mesaguy/ansible-molecule-archlinux:latest
# CI_IMAGE: carlodepieri/docker-archlinux-ansible:latest
# CI_IMAGE: ghcr.io/avnes/molecule-arch:latest
CI_IMAGE: archlinux:base-20210328.0.18194

View File

@ -5,10 +5,13 @@ driver:
name: docker name: docker
platforms: platforms:
- name: instance - name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest" image: ${CI_IMAGE}
command: ${MOLECULE_DOCKER_COMMAND:-""} command: ${MOLECULE_DOCKER_COMMAND:-""}
tmpfs:
- /run
- /tmp
volumes: volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro - /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true privileged: true
pre_build_image: true pre_build_image: true
provisioner: provisioner: