forked from spyder-ide/qtpy
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (110 loc) · 3.94 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
# Run the project's test suite
name: Tests
on:
push:
branches:
- master
- main
- '*.x'
pull_request:
branches:
- master
- main
- '*.x'
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 }}
SKIP_PIP_CHECK: ${{ matrix.skip-pip-check }}
PYQT5_VERSION: ${{ matrix.pyqt5-version }}
PYQT6_VERSION: ${{ matrix.pyqt6-version }}
PYSIDE2_VERSION: ${{ matrix.pyside2-version }}
PYSIDE6_VERSION: ${{ matrix.pyside6-version }}
PYQT5_QT_VERSION: ${{ matrix.pyqt5-qt-version }}
PYQT6_QT_VERSION: ${{ matrix.pyqt6-qt-version }}
PYSIDE2_QT_VERSION: ${{ matrix.pyside2-qt-version }}
PYSIDE6_QT_VERSION: ${{ matrix.pyside6-qt-version }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.6', '3.10']
use-conda: ['Yes', 'No']
include:
- os: ubuntu-latest
special-invocation: 'xvfb-run --auto-servernum ' # Needed for GUI tests to work
- python-version: '3.10'
skip-pyside2: true # Skip Pyside2 on all Python 3.10 builds until it supports it
- use-conda: 'Yes' # No conda packages yet for Qt6
skip-pyqt6: true
skip-pyside6: true
- python-version: '3.6'
use-conda: 'No'
skip-pip-check: 'true' # Pytest packaging issue on Python 3.6 defaults channel
pyside2-version: '5.12.0' # 5.12.1-5.12.6 fails on collection/segfaults on patch test
- os: windows-latest
python-version: '3.10'
use-conda: 'No'
pyside2-version: '5.15' # No 5.12 wheel on Windows and Python 3.10
- os: windows-latest
python-version: '3.6'
use-conda: 'Yes'
pyqt5-qt-version: '5.9' # 5.12 is apparently unreliable here
- os: macos-latest
python-version: '3.6'
use-conda: 'No'
skip-pyside6: true # Py3.6 wheels apparently still don't work on latest macOS
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
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
- name: Install Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ''
auto-activate-base: true
auto-update-conda: true
channels: conda-forge
- name: Print Conda info
shell: bash -l {0}
run: |
conda info
conda 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
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)"