Skip to content

Commit

Permalink
feat(ci): introducing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
g0blin79 committed Dec 19, 2023
1 parent 7e39803 commit 921651f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 12 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Ansible Role Percona XtraDB Cluster
'on':
push:
branches:
- "*"
- "*/*"
- "**"
- "!main"

defaults:
run:
working-directory: 'percona_xtradb_cluster'

jobs:
test:
name: Testing ansible role bmeme.percona_xtradb_cluster
runs-on: ubuntu-latest
strategy:
matrix:
distro: ["rockylinux:8.7-2.11", "rockylinux:8.8-2.11", "rockylinux:8.9-2.11", "rockylinux:9.3-2.15"]
steps:
-
name: Check out the codebase.
uses: actions/checkout@v3
-
name: Molecule test
uses: gofrolist/molecule-action@v2
with:
molecule_options: --debug
molecule_command: test
env:
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}
5 changes: 0 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
# repository or organization.
#
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy

name: Ansible Role Percona XtraDB Cluster
'on':
push:
Expand Down
13 changes: 6 additions & 7 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
scenario:
test_sequence:
- dependency
- lint
- cleanup
- destroy
- syntax
Expand All @@ -18,28 +17,25 @@ dependency:
name: galaxy
driver:
name: docker
lint: |
set -e
yamllint .
platforms:
- name: test-cluster-01
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-centos:7.9}"
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-rockylinux:8.7-2.11}"
command: "/usr/sbin/init"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
cgroupns_mode: host
pre_build_image: true
- name: test-cluster-02
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-centos:7.9}"
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-rockylinux:8.7-2.11}"
command: "/usr/sbin/init"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
cgroupns_mode: host
pre_build_image: true
- name: test-cluster-03
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-centos:7.9}"
image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-rockylinux:8.7-2.11}"
command: "/usr/sbin/init"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand All @@ -49,5 +45,8 @@ platforms:
provisioner:
name: ansible
log: true
lint:
name: ansible-lint
enabled: true
verifier:
name: ansible

0 comments on commit 921651f

Please sign in to comment.