-
-
Notifications
You must be signed in to change notification settings - Fork 153
158 lines (155 loc) · 6.28 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# 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 }}
PYQT_EXTRAS: ${{ matrix.pyqt-extras || matrix.pyqt-extras-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']
pyqt-extras-default: ['No']
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'
pyqt-extras: 'Yes' # Check PyQt extras
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'
pyqt-extras: 'Yes' # Check PyQt extras
pyqt6-version: 6.5 # Test upper bound
pyside2-version: 5.15 # Test upper bound
steps:
- name: Check job values
run: |
echo "PYTHON_VERSION:" ${{ env.PYTHON_VERSION }}
echo "USE_CONDA:" ${{ env.USE_CONDA }}
echo "PYQT5_VERSION:" ${{ env.PYQT5_VERSION }}
echo "PYQT5_QT_VERSION:" ${{ env.PYQT5_QT_VERSION }}
echo "PYQT6_VERSION:" ${{ env.PYQT6_VERSION }}
echo "PYQT6_QT_VERSION:" ${{ env.PYQT6_QT_VERSION }}
echo "PYSIDE2_VERSION:" ${{ env.PYSIDE2_VERSION }}
echo "PYSIDE2_QT_VERSION:" ${{ env.PYSIDE2_QT_VERSION }}
echo "PYSIDE6_VERSION:" ${{ env.PYSIDE6_VERSION }}
echo "PYSIDE6_QT_VERSION:" ${{ env.PYSIDE6_QT_VERSION }}
echo "QSCINTILLA_VERSION:" ${{ env.QSCINTILLA_VERSION }}
echo "PYQT_EXTRAS:" ${{ env.PYQT_EXTRAS }}
echo "SKIP_PIP_CHECK:" ${{ env.SKIP_PIP_CHECK }}
- 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)"