-
-
Notifications
You must be signed in to change notification settings - Fork 153
139 lines (136 loc) · 5.27 KB
/
ci.yml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Run the project's test suite
name: Tests
on:
push:
branches:
- master
- main
- '*.x'
pull_request:
branches:
- master
- main
- '*.x'
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test ${{ matrix.os }} Python ${{ matrix.python-version }} conda=${{ matrix.use-conda }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
defaults:
run:
shell: ${{ matrix.special-invocation }}bash -l {0}
env:
CI: 'True'
PYTHON_VERSION: ${{ matrix.python-version }}
USE_CONDA: ${{ matrix.use-conda }}
PYQT5_VERSION: ${{ matrix.pyqt5-version || matrix.qt5-version-default }}
PYQT5_QT_VERSION: ${{ matrix.pyqt5-qt-version || matrix.pyqt5-version || matrix.qt5-version-default }}
PYQT6_VERSION: ${{ matrix.pyqt6-version || matrix.qt6-version-default }}
PYQT6_QT_VERSION: ${{ matrix.pyqt6-qt-version || matrix.pyqt6-version || matrix.qt6-version-default }}
PYSIDE2_VERSION: ${{ matrix.pyside2-version || matrix.qt5-version-default }}
PYSIDE2_QT_VERSION: ${{ matrix.pyside2-qt-version || matrix.pyside2-version || matrix.qt5-version-default }}
PYSIDE6_VERSION: ${{ matrix.pyside6-version || matrix.qt6-version-default }}
PYSIDE6_QT_VERSION: ${{ matrix.pyside6-qt-version || matrix.pyside6-version || matrix.qt6-version-default }}
QSCINTILLA_VERSION: ${{ matrix.qscintilla-version || matrix.qscintilla-version-default }}
SKIP_PIP_CHECK: ${{ matrix.skip-pip-check }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.11']
use-conda: ['Yes', 'No']
qt5-version-default: ['5.12']
qt6-version-default: ['6.3']
qscintilla-version-default: ['2.13']
include:
- os: ubuntu-latest
special-invocation: 'xvfb-run --auto-servernum ' # Needed for GUI tests to work
- python-version: '3.11'
pyqt5-version: '5.15' # Python 3.11 needs 5.15+
pyside2-version: '5.15' # Python 3.11 needs 5.15+
pyside6-version: '6.4' # Python 3.11 needs 6.4+
- use-conda: 'Yes'
skip-pyqt6: true # No PyQt6 conda packages yet
pyside6-version: '6.4' # Conda only has 6.4+ for Python <3.8
- use-conda: 'No'
pyqt5-version: '5.15' # Test with latest optional packages
- python-version: '3.7'
use-conda: 'Yes'
pyside2-version: '5.13' # Conda needs 5.13+ to work reliably
pyside2-qt-version: '5.12' # Conda only has 5.12 and 5.15, not 5.13
- python-version: '3.11'
use-conda: 'No'
skip-pyside2: true # Pyside2 wheels don't support Python 3.11+
pyside6-version: '6.5' # Test upper bound
- os: windows-latest
python-version: '3.7'
use-conda: 'Yes'
pyqt5-version: '5.9' # Test lower bound
skip-pyside6: true # Test hangs
- os: windows-latest
python-version: '3.7'
use-conda: 'No'
pyqt6-version: 6.2 # Test lower bound
pyside6-version: 6.2 # Test lower bound
- os: windows-latest
python-version: '3.11'
use-conda: 'Yes'
skip-pyside6: true # Test hangs
- os: macos-latest
python-version: '3.7'
use-conda: 'No'
pyqt6-version: 6.5 # Test upper bound
pyside2-version: 5.15 # Test upper bound
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Linux system packages
if: contains(matrix.os, 'ubuntu')
shell: bash
run: |
sudo apt update
sudo apt install libpulse-dev libegl1-mesa libopengl0 gstreamer1.0-gl
- uses: tlambert03/setup-qt-libs@v1
- name: Install Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ''
auto-activate-base: true
auto-update-conda: true
channels: conda-forge
channel-priority: strict
miniforge-variant: Mambaforge
use-mamba: true
- name: Print Conda info
shell: bash -l {0}
run: |
mamba info
mamba list
- name: Test PyQt5
if: (! matrix.skip-pyqt5)
run: ./.github/workflows/test.sh pyqt5
- name: Test PyQt6
if: always() && (! (matrix.skip-pyqt6))
run: ./.github/workflows/test.sh pyqt6
- name: Test PySide2
if: always() && (! (matrix.skip-pyside2))
run: ./.github/workflows/test.sh pyside2
- name: Test PySide6
if: always() && (! (matrix.skip-pyside6))
run: ./.github/workflows/test.sh pyside6
- name: Upload coverage data to coveralls.io
shell: bash -e {0}
env:
COVERALLS_FLAG_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }} conda=${{ matrix.use-conda }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd temp_test_dir # Switch to test working dir per non-src-layout hack
cat qtpy_basedir.txt
pipx run coveralls --service=github --rcfile="../.coveragerc" --basedir="$(cat qtpy_basedir.txt)"