mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2025-08-15 13:48:28 +02:00
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:
parent
5b8e39b38e
commit
241dae5ba4
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
@ -39,8 +39,10 @@ jobs:
|
||||
name: Molecule
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
distro:
|
||||
- archlinux
|
||||
- rockylinux8
|
||||
- centos7
|
||||
- ubuntu2004
|
||||
@ -64,9 +66,24 @@ jobs:
|
||||
- name: Install test dependencies.
|
||||
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.
|
||||
if: matrix.distro != 'archlinux'
|
||||
run: molecule test
|
||||
env:
|
||||
PY_COLORS: '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
|
||||
|
@ -5,10 +5,13 @@ driver:
|
||||
name: docker
|
||||
platforms:
|
||||
- name: instance
|
||||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
|
||||
image: ${CI_IMAGE}
|
||||
command: ${MOLECULE_DOCKER_COMMAND:-""}
|
||||
tmpfs:
|
||||
- /run
|
||||
- /tmp
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
||||
privileged: true
|
||||
pre_build_image: true
|
||||
provisioner:
|
||||
|
Loading…
Reference in New Issue
Block a user