mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-27 07:01:27 -07:00
Revert to previous workflow to test value of result.msg
This commit is contained in:
parent
7d3dc58236
commit
869f62087f
1 changed files with 116 additions and 66 deletions
182
.github/workflows/ansible-test-plugins.yml
vendored
182
.github/workflows/ansible-test-plugins.yml
vendored
|
@ -15,12 +15,12 @@ on:
|
||||||
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
mysql_version_file: "tests/integration/targets/setup_mysql/defaults/main.yml"
|
mysql_version_file: "./ansible_collections/community/mysql/tests/integration/targets/setup_mysql/defaults/main.yml"
|
||||||
connector_version_file: "tests/integration/targets/setup_mysql/vars/main.yml"
|
connector_version_file: "./ansible_collections/community/mysql/tests/integration/targets/setup_mysql/vars/main.yml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# sanity:
|
# sanity:
|
||||||
# name: "Sanity (Ansible: ${{ matrix.ansible }})"
|
# name: "Sanity (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }})"
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
# strategy:
|
# strategy:
|
||||||
# matrix:
|
# matrix:
|
||||||
|
@ -30,22 +30,48 @@ jobs:
|
||||||
# - stable-2.13
|
# - stable-2.13
|
||||||
# - stable-2.14
|
# - stable-2.14
|
||||||
# - devel
|
# - devel
|
||||||
|
# python:
|
||||||
|
# - 3.8
|
||||||
|
# - 3.9
|
||||||
|
# exclude:
|
||||||
|
# - python: 3.8
|
||||||
|
# ansible: stable-2.13
|
||||||
|
# - python: 3.8
|
||||||
|
# ansible: stable-2.14
|
||||||
|
# - python: 3.8
|
||||||
|
# ansible: devel
|
||||||
|
# - python: 3.9
|
||||||
|
# ansible: stable-2.11
|
||||||
|
# - python: 3.9
|
||||||
|
# ansible: stable-2.12
|
||||||
# steps:
|
# steps:
|
||||||
# - name: Perform sanity testing
|
|
||||||
# uses: ansible-community/ansible-test-gh-action@release/v1
|
# - name: Check out code
|
||||||
|
# uses: actions/checkout@v2
|
||||||
# with:
|
# with:
|
||||||
# ansible-core-version: ${{ matrix.ansible }}
|
# path: ansible_collections/community/mysql
|
||||||
# testing-type: sanity
|
|
||||||
|
# - name: Set up 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:
|
integration:
|
||||||
name: "Integration (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, MySQL: ${{ matrix.db_engine_version }}, Connector: ${{ matrix.connector }})"
|
name: "Integration (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, MySQL: ${{ matrix.mysql }}, Connector: ${{ matrix.connector }})"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
db_engine_version:
|
mysql:
|
||||||
- mysql_5.7.31
|
# - 5.7.31
|
||||||
# - mysql_8.0.22
|
- 8.0.22
|
||||||
ansible:
|
ansible:
|
||||||
# - stable-2.11
|
# - stable-2.11
|
||||||
- stable-2.12
|
- stable-2.12
|
||||||
|
@ -60,63 +86,68 @@ jobs:
|
||||||
# - pymysql==0.7.10
|
# - pymysql==0.7.10
|
||||||
- pymysql==0.9.3
|
- pymysql==0.9.3
|
||||||
# - mysqlclient==2.0.1
|
# - mysqlclient==2.0.1
|
||||||
exclude: []
|
# exclude:
|
||||||
# - db_engine_version: mysql_8.0.22
|
# - mysql: 8.0.22
|
||||||
# connector: pymysql==0.7.10
|
# connector: pymysql==0.7.10
|
||||||
# - python: 3.6
|
# - python: 3.6
|
||||||
# ansible: stable-2.12
|
# ansible: stable-2.12
|
||||||
# - python: 3.6
|
# - python: 3.6
|
||||||
# ansible: stable-2.13
|
# ansible: stable-2.13
|
||||||
# - python: 3.6
|
# - python: 3.6
|
||||||
# ansible: stable-2.14
|
# ansible: stable-2.14
|
||||||
# - python: 3.6
|
# - python: 3.6
|
||||||
# ansible: devel
|
# ansible: devel
|
||||||
# - python: 3.8
|
# - python: 3.8
|
||||||
# ansible: stable-2.11
|
# ansible: stable-2.11
|
||||||
# - python: 3.8
|
# - python: 3.8
|
||||||
# ansible: stable-2.13
|
# ansible: stable-2.13
|
||||||
# - python: 3.8
|
# - python: 3.8
|
||||||
# ansible: stable-2.14
|
# ansible: stable-2.14
|
||||||
# - python: 3.8
|
# - python: 3.8
|
||||||
# ansible: devel
|
# ansible: devel
|
||||||
# - python: 3.9
|
# - python: 3.9
|
||||||
# ansible: stable-2.11
|
# ansible: stable-2.11
|
||||||
# - python: 3.9
|
# - python: 3.9
|
||||||
# ansible: stable-2.12
|
# ansible: stable-2.12
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: >-
|
|
||||||
Perform integration testing against
|
- name: Check out code
|
||||||
Ansible version ${{ matrix.ansible }}
|
uses: actions/checkout@v2
|
||||||
under Python ${{ matrix.python }}
|
|
||||||
uses: ansible-community/ansible-test-gh-action@release/v1
|
|
||||||
with:
|
with:
|
||||||
ansible-core-version: ${{ matrix.ansible }}
|
path: ansible_collections/community/mysql
|
||||||
pre-test-cmd: >-
|
|
||||||
DB_ENGINE=$(echo '${{ matrix.db_engine_version }}' | awk -F_ '{print $1}');
|
|
||||||
DB_VERSION=$(echo '${{ matrix.db_engine_version }}' | awk -F_ '{print $2}');
|
|
||||||
DB_ENGINE_PRETTY=$([[ "${DB_ENGINE}" == 'mysql' ]] && echo 'MySQL' || echo 'MariaDB');
|
|
||||||
>&2 echo Matrix factor for the DB is ${{ matrix.db_engine_version }}...;
|
|
||||||
>&2 echo Setting ${DB_ENGINE_PRETTY} version to ${DB_VERSION}...;
|
|
||||||
sed -i -e "s/^${DB_ENGINE}_version:.*/${DB_ENGINE}_version: $DB_VERSION/g" -e 's/^mariadb_install: false/mariadb_install: true/g' '${{ env.mysql_version_file }}';
|
|
||||||
${{
|
|
||||||
matrix.db_engine_version == 'mariadb_10.8.3'
|
|
||||||
&& format(
|
|
||||||
'>&2 echo Set MariaDB v10.8.3 URL sub dir...; sed -i -e "s/^mariadb_url_subdir:.*/mariadb_url_subdir: linux-systemd/g" "{0}";', env.connector_version_file
|
|
||||||
)
|
|
||||||
|| ''
|
|
||||||
}}
|
|
||||||
>&2 echo Setting Connector version to ${{ matrix.connector }}...;
|
|
||||||
sed -i 's/^python_packages:.*/python_packages: [${{ matrix.connector }}]/' ${{ env.connector_version_file }}
|
|
||||||
target-python-version: ${{ matrix.python }}
|
|
||||||
testing-type: integration
|
|
||||||
|
|
||||||
- name: Setup tmate session
|
- name: Setup tmate session
|
||||||
uses: mxschmitt/action-tmate@v3
|
uses: mxschmitt/action-tmate@v3
|
||||||
if: ${{ failure() }}
|
|
||||||
with:
|
with:
|
||||||
limit-access-to-actor: true
|
limit-access-to-actor: true
|
||||||
|
|
||||||
|
- name: Set up 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: Set Connector version (${{ matrix.connector }})
|
||||||
|
run: "sed -i 's/^python_packages:.*/python_packages: [${{ matrix.connector }}]/' ${{ env.connector_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
|
||||||
|
|
||||||
# units:
|
# units:
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
# name: Units (Ⓐ${{ matrix.ansible }})
|
# name: Units (Ⓐ${{ matrix.ansible }})
|
||||||
|
@ -147,11 +178,30 @@ jobs:
|
||||||
# ansible: stable-2.12
|
# ansible: stable-2.12
|
||||||
|
|
||||||
# steps:
|
# steps:
|
||||||
# - name: >-
|
# - name: Check out code
|
||||||
# Perform unit testing against
|
# uses: actions/checkout@v2
|
||||||
# Ansible version ${{ matrix.ansible }}
|
|
||||||
# uses: ansible-community/ansible-test-gh-action@release/v1
|
|
||||||
# with:
|
# with:
|
||||||
# ansible-core-version: ${{ matrix.ansible }}
|
# path: ./ansible_collections/community/mysql
|
||||||
# target-python-version: ${{ matrix.python }}
|
|
||||||
# testing-type: units
|
# - name: Set up 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
|
||||||
|
|
||||||
|
# # Run the unit tests
|
||||||
|
# - name: Run unit test
|
||||||
|
# run: ansible-test units -v --color --docker --coverage
|
||||||
|
# working-directory: ./ansible_collections/community/mysql
|
||||||
|
|
||||||
|
# # ansible-test support producing code coverage date
|
||||||
|
# - name: Generate coverage report
|
||||||
|
# run: ansible-test coverage xml -v --requirements --group-by command --group-by version
|
||||||
|
# working-directory: ./ansible_collections/community/mysql
|
||||||
|
|
||||||
|
# # See the reports at https://codecov.io/gh/GITHUBORG/REPONAME
|
||||||
|
# - uses: codecov/codecov-action@v1
|
||||||
|
# with:
|
||||||
|
# fail_ci_if_error: false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue