Skip to content

Tests

Tests #107

Workflow file for this run

name: Tests
on:
pull_request:
workflow_dispatch:
push:
branches: ['master', 'next']
paths-ignore: ['**.md', '**.po', '**.mo', '**.pot']
jobs:
tests:
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
include:
# Legacy config with no optional dependencies and ancient pygit2
# pytest 8.3.5 is the last version without a mandatory requirement for pygments
- {name: '310-pyqt5-legacy', os: ubuntu-22.04, py: '3.10', qt: pyqt5, downgrade-git: true, skip-fuse: true,
piptweak: 'pip install pygit2==1.14.1 pytest==8.3.5 && pip uninstall -y pygments mfusepy' }
# Semi-legacy configs
- {name: '311-pyqt6', os: ubuntu-latest, py: '3.11', qt: pyqt6, downgrade-git: true}
- {name: '312-pyqt6', os: ubuntu-latest, py: '3.12', qt: pyqt6, downgrade-git: true}
- {name: '313-pyqt6', os: ubuntu-latest, py: '3.13', qt: pyqt6, downgrade-git: true}
# Up-to-date configs
- {name: '314-pyqt6', os: ubuntu-latest, py: '3.14', qt: pyqt6}
- {name: '314-pyside6', os: ubuntu-latest, py: '3.14', qt: pyside6, coverage: true}
- {name: '314-pyqt6-mac', os: macos-latest, py: '3.14', qt: pyqt6, skip-fuse: true}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Qt dependencies
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update
sudo apt install ${{ matrix.qt == 'pyqt5' && 'libqt5gui5' || 'libqt6gui6' }}
- name: Downgrade git
if: ${{ matrix.downgrade-git }}
run: |
sudo apt remove git git-man
sudo apt install git
- name: Git version
run: |
which git
git version
which gpg
gpg --version
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.py }}
cache: 'pip'
- name: Pip dependencies
run: |
pip install -e .[${{ matrix.qt }},pygments,test,mfusepy]
${{ matrix.piptweak }}
- run: ruff check
- name: Unit tests
run: ./test.py -1 -v --qt=${{ matrix.qt }} --with-network ${{ matrix.skip-fuse && ' ' || '--with-fuse' }} ${{ matrix.coverage && '--cov' }}
- name: Upload coverage report
uses: actions/upload-artifact@v6
if: ${{ matrix.coverage }}
with:
path: coverage_html_report
name: coverage_${{ matrix.name }}_${{ github.sha }}