Skip to content

[CI/CD] pre-commit autoupdate #4062

[CI/CD] pre-commit autoupdate

[CI/CD] pre-commit autoupdate #4062

Workflow file for this run

name: test_python
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login
strategy:
matrix:
include:
# Tests with oldest Python version able to build the project on oldest available runner images
- { dist: 'ubuntu-22.04', python: '3.9' }
- { dist: 'ubuntu-22.04-arm', python: '3.9' }
# https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=python3
- { dist: 'ubuntu-22.04', python: '3.10.6' }
- { dist: 'ubuntu-24.04', python: '3.12.3' }
# No Python 3.14 supported for ubuntu-26.04 runners yet: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
- { dist: 'ubuntu-24.04', python: '3.14.3' }
- { dist: 'ubuntu-22.04-arm', python: '3.10.6' }
- { dist: 'ubuntu-24.04-arm', python: '3.12.3' }
- { dist: 'ubuntu-24.04-arm', python: '3.14.3' }
fail-fast: false
runs-on: ${{ matrix.dist }}
name: "Test on ${{ matrix.dist }}"
steps:
- name: Ubuntu Noble workarounds
if: matrix.dist == 'ubuntu-24.04' || matrix.dist == 'ubuntu-24.04-arm'
run: |
# error: externally-managed-environment
echo -e '[global]\nbreak-system-packages=true' | sudo tee /etc/pip.conf
# ERROR: Cannot uninstall pip 24.0, RECORD file not found. Hint: The package was installed by debian.
- run: sudo DEBIAN_FRONTEND='noninteractive' apt-get -qq autopurge python3-pip python3-setuptools python3-wheel
- run: sudo apt-get -q update
- run: sudo DEBIAN_FRONTEND='noninteractive' apt-get -qq --no-install-recommends install curl ffmpeg motion v4l-utils
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- run: python3 -m pip install --upgrade pip setuptools wheel
- run: python3 -m pip install --upgrade build mypy pytest
- run: python3 -m build
- run: python3 -m pip install .
- run: mkdir --parents --verbose .mypy_cache
- run: mypy --ignore-missing-imports --install-types --non-interactive --exclude build/ .
- run: pytest