Skip to content

Drop testing for MariaDB 10.6 #1434

Drop testing for MariaDB 10.6

Drop testing for MariaDB 10.6 #1434

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- '**'
pull_request:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
tests:
name: ${{ matrix.database }} Python ${{ matrix.python-version }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'
database:
- mysql:9.4
- mysql:8.4
- mariadb:12.0
- mariadb:11.8
- mariadb:11.4
- mariadb:10.11
services:
database:
image: ${{ matrix.database }}
env:
MYSQL_ROOT_PASSWORD: hunter2
ports:
- 3306:3306
options: --tmpfs /var/lib/mysql
env:
DB_HOST: 127.0.0.1
DB_USER: root
DB_PASSWORD: hunter2
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: Install dependencies
run: uv pip install --system tox tox-uv
- name: Install percona-toolkit
run: |
sudo apt-get update
sudo apt-get install -y percona-toolkit
- name: Run tox targets for ${{ matrix.python-version }}
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)
- name: Format database identifier
run: |
DB=${{ matrix.database }}
echo "db_id=${DB//:/-}"
echo "db_id=${DB//:/-}" >> "$GITHUB_OUTPUT"
id: format_db_id
- name: Upload coverage data
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-data-${{ matrix.python-version }}-${{ steps.format_db_id.outputs.db_id }}
path: '${{ github.workspace }}/.coverage/*'
include-hidden-files: true
if-no-files-found: error
coverage:
name: Coverage
runs-on: ubuntu-24.04
needs: tests
if: always()
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Install dependencies
run: uv pip install --system coverage[toml]
- name: Download data
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: .coverage
pattern: coverage-data-*
merge-multiple: true
- name: Combine coverage and fail if it's <100%
run: |
python -m coverage combine
python -m coverage html --skip-covered --skip-empty
python -m coverage report --fail-under=100
echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY
python -m coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
- name: Upload HTML report
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: html-report
path: htmlcov
release:
needs: [coverage]
if: success() && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-24.04
environment: release
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: false
- name: Build
run: uv build
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0