initial commit (#1)

* initial commit

* removed remaining references to community.general

* enabled integration pipeline

* switched from preconfigured replication topology to simple multinode install

* updated version from 1.0.0 to 0.1.0
This commit is contained in:
Ben Mildren 2020-07-10 17:16:58 +01:00 committed by GitHub
commit c26bc095ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
89 changed files with 8774 additions and 135 deletions

View file

@ -0,0 +1,94 @@
name: Plugins CI
on:
push:
paths:
- 'plugins/**'
- 'tests/**'
- '.github/workflows/ansible-test.yml'
pull_request:
paths:
- 'plugins/**'
- 'tests/**'
- '.github/workflows/ansible-test.yml'
schedule:
- cron: '0 6 * * *'
env:
mysql_version_file: "./ansible_collections/community/mysql/tests/integration/targets/setup_mysql/defaults/main.yml"
jobs:
sanity:
name: "Sanity (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }})"
runs-on: ubuntu-latest
strategy:
matrix:
ansible:
- stable-2.9
- stable-2.10
- devel
python:
- 2.7
- 3.8
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/mysql
- 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: Run sanity tests
run: ansible-test sanity --docker -v --color
working-directory: ./ansible_collections/community/mysql
integration:
name: "Integration (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, MySQL: ${{ matrix.mysql }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mysql:
- 8.0.20
ansible:
- stable-2.9
- stable-2.10
- devel
python:
- 3.6
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/mysql
- 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: Set MySQL version (${{ matrix.mysql }})
run: "sed -i 's/^mysql_version:.*/mysql_version: \"${{ matrix.mysql }}\"/g' ${{ env.mysql_version_file }}"
- name: Run integration tests
run: ansible-test integration --docker -v --color --retry-on-error --continue-on-error --python ${{ matrix.python }} --diff --coverage
working-directory: ./ansible_collections/community/mysql
- name: Generate coverage report.
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
working-directory: ./ansible_collections/community/mysql
- uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false

View file

@ -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 }}, MySQL: ${{ matrix.mysql }})"
runs-on: ubuntu-latest
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
strategy:
matrix:
mysql:
- 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/mysql
- 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/mysql

View file

@ -1,93 +0,0 @@
name: CI
on:
- pull_request
jobs:
sanity:
name: Sanity (${{ matrix.ansible }})
strategy:
matrix:
ansible:
- stable-2.10
- devel
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
with:
# FIXME ansible_collections/NAMESPACE/COLLECTION
path: ansible_collections/community/FIXME
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
- name: Run sanity tests
run: ansible-test sanity --docker -v --color --python 3.6
# If you don't have unit tests, you can delete this section
units:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
with:
# FIXME ansible_collections/NAMESPACE/COLLECTION
path: ansible_collections/community/grafana
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install ansible-base (devel)
run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
- name: Run unit tests
run: ansible-test units --docker -v --color --python 3.6 --coverage
- name: Generate coverage report.
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
- uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false
# If you don't have unit tests, you can delete this section
# Though you should consider creating some
integration:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.6"]
container:
image: python:${{ matrix.python_version }}-alpine
steps:
- name: Check out code
uses: actions/checkout@v1
with:
# FIXME ansible_collections/NAMESPACE/COLLECTION
path: ansible_collections/community/FIXME
- name: Install ansible-base (stable-2.10)
run: pip install https://github.com/ansible/ansible/archive/stable-2.10.tar.gz --disable-pip-version-check
- name: Run integration tests on Python ${{ matrix.python_version }}
run: ansible-test integration --docker -v --color --retry-on-error --python ${{ matrix.python_version }} --continue-on-error --diff --coverage
- name: Generate coverage report.
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
# FIXME ansible_collections/NAMESPACE/COLLECTION
working-directory: ./ansible_collections/community/FIXME
- uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false