Repository navigation
81 lines (70 loc) · 2.61 KB
/
Copy pathtests.yml
File metadata and controls
81 lines (70 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Tests
on:
pull_request:
workflow_dispatch:
push:
branches: ['master', 'next']
paths-ignore: ['**.md', '**.po', '**.mo', '**.pot']
jobs:
ruff-mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with: {python-version: 3.14, cache: 'pip'}
- run: pip install 'pyqt6<6.12' # QtGui.pyi from PyQt6 6.12 causes mypy errors as of 10/2026
- run: pip install -e .[lint,pyqt6]
- run: ruff check
- run: mypy
if: '!cancelled()' # run mypy even if ruff failed above
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
- {name: '312-pyqt5-legacy', os: ubuntu-22.04, py: '3.12', qt: pyqt5, downgrade-git: true, skip-fuse: true,
piptweak: 'pip install pygit2==1.14.1 pygments==2.12 && pip uninstall -y mfusepy' }
# Semi-legacy configs
- {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, coverage: true}
- {name: '314-pyqt6-mac', os: macos-latest, py: '3.14', qt: pyqt6, skip-fuse: true}
- {name: '314-pyside6', os: ubuntu-latest, py: '3.14', qt: pyside6}
steps:
- uses: actions/checkout@v7
- 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
git lfs version 2>/dev/null || echo '*** LFS not available on this runner ***'
which gpg
gpg --version
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.py }}
cache: 'pip'
- run: |
pip install -e .[${{ matrix.qt }},test,mfusepy]
${{ matrix.piptweak }}
- run: ./test.py -v --qt=${{ matrix.qt }} --with-network ${{ matrix.skip-fuse && ' ' || '--with-fuse' }} ${{ matrix.coverage && '--cov' }}
- name: Upload coverage report
uses: actions/upload-artifact@v7
if: ${{ matrix.coverage }}
with:
path: coverage_html_report
name: coverage_${{ matrix.name }}_${{ github.sha }}