Skip to content

Commit

Permalink
Use GitHub actions matrix for CI (#12)
Browse files Browse the repository at this point in the history
* Use GitHub actions matrix to more easily identify failing platforms

---------

Co-authored-by: Benjamin Cook <[email protected]>
  • Loading branch information
bcook254 and Benjamin Cook authored Apr 20, 2024
1 parent 374132c commit fe86b4b
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 94 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,28 @@ jobs:
molecule:
name: Molecule Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- name: ubuntu2204
image: docker.io/geerlingguy/docker-ubuntu2204-ansible:latest
- name: ubuntu2004
image: docker.io/geerlingguy/docker-ubuntu2004-ansible:latest
- name: debian12
image: docker.io/geerlingguy/docker-debian12-ansible
- name: debian11
image: docker.io/geerlingguy/docker-debian11-ansible
- name: debian10
image: docker.io/geerlingguy/docker-debian10-ansible
- name: fedora39
image: docker.io/geerlingguy/docker-fedora39-ansible
- name: fedora38
image: docker.io/geerlingguy/docker-fedora38-ansible
- name: centosstream9
image: ghcr.io/bcook254/docker-centosstream9-ansible
- name: centosstream8
image: ghcr.io/bcook254/docker-centosstream8-ansible
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
Expand All @@ -50,7 +72,9 @@ jobs:
run: python -m pip install ansible molecule molecule-plugins[docker] docker

- name: Run Molecule tests.
run: molecule test --driver-name docker --scenario-name all
run: molecule test --driver-name docker --scenario-name ci
env:
PLATFORM_NAME: ${{ matrix.platform.name }}
PLATFORM_IMAGE: ${{ matrix.platform.image }}
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
93 changes: 0 additions & 93 deletions molecule/all/molecule.yml

This file was deleted.

File renamed without changes.
29 changes: 29 additions & 0 deletions molecule/ci/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
dependency:
name: galaxy
options:
requirements-file: requirements.yml
driver:
name: podman
platforms:
- name: ${PLATFORM_NAME}
image: ${PLATFORM_IMAGE}
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
pre_build_image: true
provisioner:
name: ansible
config_options:
defaults:
interpreter_python: auto_silent
callbacks_enabled: yaml
ssh_connection:
pipelining: false
verifier:
name: ansible
lint: |
set -e
ansible-lint .
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fe86b4b

Please sign in to comment.