diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..59b5de0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c36a8f9..a6e22d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index d5759fe..08fc49d 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -2,7 +2,6 @@ scenario: test_sequence: - dependency - - lint - cleanup - destroy - syntax @@ -18,12 +17,9 @@ 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 @@ -31,7 +27,7 @@ platforms: 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 @@ -39,7 +35,7 @@ platforms: 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 @@ -49,5 +45,8 @@ platforms: provisioner: name: ansible log: true + lint: + name: ansible-lint + enabled: true verifier: name: ansible \ No newline at end of file