summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/proxysql/.github
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/community/proxysql/.github')
-rw-r--r--ansible_collections/community/proxysql/.github/patchback.yml5
-rw-r--r--ansible_collections/community/proxysql/.github/workflows/ansible-test-plugins.yml86
-rw-r--r--ansible_collections/community/proxysql/.github/workflows/ansible-test-roles.yml56
3 files changed, 147 insertions, 0 deletions
diff --git a/ansible_collections/community/proxysql/.github/patchback.yml b/ansible_collections/community/proxysql/.github/patchback.yml
new file mode 100644
index 000000000..33ad6e84a
--- /dev/null
+++ b/ansible_collections/community/proxysql/.github/patchback.yml
@@ -0,0 +1,5 @@
+---
+backport_branch_prefix: patchback/backports/
+backport_label_prefix: backport-
+target_branch_prefix: stable-
+...
diff --git a/ansible_collections/community/proxysql/.github/workflows/ansible-test-plugins.yml b/ansible_collections/community/proxysql/.github/workflows/ansible-test-plugins.yml
new file mode 100644
index 000000000..375b7aa2c
--- /dev/null
+++ b/ansible_collections/community/proxysql/.github/workflows/ansible-test-plugins.yml
@@ -0,0 +1,86 @@
+name: Plugins CI
+on:
+ push:
+ paths:
+ - 'plugins/**'
+ - 'tests/**'
+ - '.github/workflows/ansible-test-plugins.yml'
+ pull_request:
+ paths:
+ - 'plugins/**'
+ - 'tests/**'
+ - '.github/workflows/ansible-test-plugins.yml'
+ schedule:
+ - cron: '0 6 * * *'
+
+
+env:
+ proxysql_version_file: "./tests/integration/targets/setup_proxysql/defaults/main.yml"
+
+jobs:
+ sanity:
+ name: "Sanity (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }})"
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ ansible:
+ - stable-2.12
+ - stable-2.13
+ - stable-2.14
+ - devel
+ steps:
+ - name: Perform sanity testing
+ uses: ansible-community/ansible-test-gh-action@release/v1
+ with:
+ ansible-core-version: ${{ matrix.ansible }}
+ testing-type: sanity
+ pull-request-change-detection: true
+
+ integration:
+ name: "Integration (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, ProxySQL: ${{ matrix.proxysql }})"
+ runs-on: ubuntu-20.04
+ strategy:
+ fail-fast: false
+ matrix:
+ proxysql:
+ - 2.3.2
+ ansible:
+ - stable-2.12
+ - stable-2.13
+ - stable-2.14
+ - devel
+ python:
+ - 3.9
+ include:
+ - python: 3.9
+ ansible: "stable-2.12"
+ proxysql: 2.4.4
+ - python: 3.9
+ ansible: "stable-2.13"
+ proxysql: 2.4.4
+ - python: 3.9
+ ansible: "stable-2.14"
+ proxysql: 2.4.4
+ - python: 3.9
+ ansible: "stable-2.12"
+ proxysql: 2.3.2
+ - python: 3.9
+ ansible: "stable-2.13"
+ proxysql: 2.3.2
+ - python: 3.9
+ ansible: "stable-2.14"
+ proxysql: 2.3.2
+
+ steps:
+ - name: >-
+ Perform integration testing against
+ Ansible version ${{ matrix.ansible }}
+ under Python ${{ matrix.python }}
+ uses: ansible-community/ansible-test-gh-action@release/v1
+ with:
+ ansible-core-version: ${{ matrix.ansible }}
+ pre-test-cmd: >-
+ sed -i 's/^proxysql_version:.*/proxysql_version: \"${{ matrix.proxysql }}\"/g' ${{ env.proxysql_version_file }}
+ target-python-version: ${{ matrix.python }}
+ testing-type: integration
+ pull-request-change-detection: true
diff --git a/ansible_collections/community/proxysql/.github/workflows/ansible-test-roles.yml b/ansible_collections/community/proxysql/.github/workflows/ansible-test-roles.yml
new file mode 100644
index 000000000..796b33d45
--- /dev/null
+++ b/ansible_collections/community/proxysql/.github/workflows/ansible-test-roles.yml
@@ -0,0 +1,56 @@
+name: Roles CI
+on:
+ push:
+ paths:
+ - 'roles/**'
+ - '.github/workflows/ansible-test-roles.yml'
+ pull_request:
+ paths:
+ - 'roles/**'
+ - '.github/workflows/ansible-test-roles.yml'
+ schedule:
+ - cron: '0 6 * * *'
+
+jobs:
+ molecule:
+ name: "Molecule (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, ProxySQL: ${{ matrix.proxysql }})"
+ runs-on: ubuntu-latest
+ env:
+ PY_COLORS: 1
+ ANSIBLE_FORCE_COLOR: 1
+ strategy:
+ matrix:
+ proxysql:
+ - 2.0.12
+ ansible:
+ - stable-2.9
+ ### it looks like there's errors for 2.10+ with ansible-lint (https://github.com/ansible/ansible-lint/pull/878)
+ ### and molecule (_maybe_ relating to https://github.com/ansible-community/molecule/pull/2547)
+ # - stable-2.10
+ # - devel
+ python:
+ - 2.7
+ - 3.8
+
+ steps:
+
+ - name: Check out code
+ uses: actions/checkout@v2
+ with:
+ path: ansible_collections/community/proxysql
+
+ - name: Set up Python ${{ matrix.python }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python }}
+
+ - name: Install ansible-base (${{ matrix.ansible }})
+ run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
+
+ - name: Install molecule and related dependencies
+ run: |
+ pip install ansible-lint docker flake8 molecule testinfra yamllint
+
+ - name: Run molecule default test scenario
+ run: for d in roles/*/; do (cd "$d" && molecule --version && molecule test) done
+ working-directory: ./ansible_collections/community/proxysql