Skip to content

Commit 498f9ba

Browse files
committed
Centralize per job CI config in the matrix itself
1 parent 76ad6a6 commit 498f9ba

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/tests.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ jobs:
4545
REQUIREMENTS_FILE: 'requirements/environment.yml'
4646
- INSTALL_TYPE: 'pip'
4747
REQUIREMENTS_FILE: 'requirements/pip.yml'
48+
- QT_LIB: 'pyqt5'
49+
QT_DEPS: 'pyqt5'
50+
- QT_LIB: 'pyqt6'
51+
QT_DEPS: 'pyqt6!=6.4.0 pyqt6-qt6!=6.4.0'
52+
- RUNNER_OS: 'ubuntu'
53+
PYTHON_VERSION: '3.12'
54+
COVERAGE: 'True'
55+
COVERAGE_DEPS: 'coveralls pytest-cov'
56+
PYTEST_COVERAGE_ARGS: '--cov=qtconsole'
4857
exclude:
4958
# Disable unsupported configurations
5059
- INSTALL_TYPE: 'conda'
@@ -95,20 +104,16 @@ jobs:
95104
if: matrix.INSTALL_TYPE == 'pip'
96105
run: |
97106
pip install -e .[test]
98-
if [ ${{ matrix.QT_LIB }} = "pyqt6" ]; then
99-
pip install pyqt6!=6.4.0 pyqt6-qt6!=6.4.0 coveralls pytest-cov
100-
else
101-
pip install ${{ matrix.QT_LIB }} coveralls pytest-cov
102-
fi
107+
pip install ${{ matrix.QT_DEPS }} ${{ matrix.COVERAGE_DEPS }}
103108
- name: Show environment information
104109
run: |
105110
conda info
106111
conda list
107112
pip list
108113
- name: Run tests
109-
run: ${{ matrix.SPECIAL_INVOCATION }}pytest -vv -s --full-trace --color=yes --cov=qtconsole qtconsole
110-
- name: Upload coverage to coveralls
111-
if: matrix.RUNNER_OS == 'ubuntu' && matrix.PYTHON_VERSION == '3.12'
114+
run: ${{ matrix.SPECIAL_INVOCATION }}pytest -vv -s --full-trace --color=yes ${{ matrix.PYTEST_COVERAGE_ARGS }} qtconsole
115+
- name: Upload coverage to Coveralls
116+
if: matrix.COVERAGE == 'True'
112117
run: coveralls
113118

114119
check:

0 commit comments

Comments
 (0)