ansible-collections/community.mysql

GHA: add testing against Python 3.11, 3.12 and PyMySQL versions present in RHEL8 and RHEL9

Opened this issue · 0 comments

SUMMARY

Currently the tests matrix doesn't match the available packages of PyMySQL for RHEL8 and RHEL9.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

Tests

ADDITIONAL INFORMATION

I propose to add the 3 following version of PyMySQL to the tests matrix:

- '0.10.1'  # Released Sep 10, 2020 RHEL8-9 python3-PyMySQL
- '1.0.2'   # Released Jan 09, 2021 RHEL9 python3.11-PyMySQL
- '1.1.0'   # Released Jun 26, 2023 RHEL9 python3.12-PyMySQL

Also the current test matrix tests against Python 3.8, 3.9 and 3.10. But not for 3.11 and 3.12.

Instead of adding new python version for the whole matrix, I propose to take advantage of the include option for GitHub Action matrix: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude So something along the line:

strategy:
  matrix:
    python:
      - '3.8'
      - '3.9'
      - '3.10'
    connector_version:
      - '0.7.11'   # Released Apr 05, 2017
      - '0.9.3'     # Released Dec 18, 2018
      - '2.0.1'
      - '2.0.3'
      - '2.1.1'
    include:
      - python: '3.6'  # RHEL8 uses 3.6 by default
        connector_version: '0.10.1'  # From RHEL package python3-PyMySQL
        connector_name: pymysql

      - python: '3.9'  # RHEL9 uses 3.9 by default
        connector_version: '0.10.1'  # From RHEL package python3-PyMySQL
        connector_name: pymysql

      - python: '3.11'
        connector_version: '1.0.2'  # From RHEL package python3.11-PyMySQL
        connector_name: pymysql

      - python: '3.12'
        connector_version: '1.1.0'  # From RHEL package python3.12-PyMySQL
        connector_name: pymysql

Or alternatively, we could add Python 3.11 to ansible-core 2.17 and 3.12 to devel ? This is a more generalized matrix and still keep the amount of tests to a reasonable count.