Skip to content
86 changes: 0 additions & 86 deletions .github/workflows/linux-tests.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/macos-tests.yml

This file was deleted.

132 changes: 132 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Run tests

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: ${{ matrix.RUNNER_OS }} Py${{ matrix.PYTHON_VERSION }} - ${{ matrix.INSTALL_TYPE }} - ${{ matrix.QT_LIB }}
runs-on: ${{ matrix.RUNNER_OS }}-latest
timeout-minutes: 15
defaults:
run:
shell: bash -el {0}
env:
CI: 'True'
QTCONSOLE_TESTING: 'True'
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
RUNNER_OS: ${{ matrix.RUNNER_OS }}
INSTALL_TYPE: ${{ matrix.INSTALL_TYPE }}
QT_API: ${{ matrix.QT_LIB }}
PYTEST_QT_API: ${{ matrix.QT_LIB }}
COVERALLS_REPO_TOKEN: 'XWVhJf2AsO7iouBLuCsh0pPhwHy81Uz1v'
COVERALLS_SERVICE_NAME: 'github-actions'
strategy:
fail-fast: false
matrix:
RUNNER_OS: ['ubuntu', 'windows', 'macos']
PYTHON_VERSION: ['3.9', '3.10', '3.11', '3.12', '3.13']
INSTALL_TYPE: ['conda', 'pip']
QT_LIB: ['pyqt5', 'pyqt6']
include:
- RUNNER_OS: 'ubuntu'
SPECIAL_INVOCATION: 'xvfb-run --auto-servernum '
- INSTALL_TYPE: 'conda'
REQUIREMENTS_FILE: 'requirements/environment.yml'
- INSTALL_TYPE: 'pip'
REQUIREMENTS_FILE: 'requirements/pip.yml'
- QT_LIB: 'pyqt5'
QT_DEPS: 'pyqt5'
- QT_LIB: 'pyqt6'
QT_DEPS: 'pyqt6!=6.4.0 pyqt6-qt6!=6.4.0'
- RUNNER_OS: 'ubuntu'
PYTHON_VERSION: '3.12'
COVERAGE: 'True'
COVERAGE_DEPS: 'coveralls pytest-cov'
PYTEST_COVERAGE_ARGS: '--cov=qtconsole'
exclude:
# Disable unsupported configurations
- INSTALL_TYPE: 'conda'
QT_LIB: 'pyqt6'
# Prune the number of matrix jobs
- RUNNER_OS: 'windows'
PYTHON_VERSION: '3.10'
- RUNNER_OS: 'windows'
PYTHON_VERSION: '3.11'
- RUNNER_OS: 'windows'
PYTHON_VERSION: '3.12'
- RUNNER_OS: 'windows'
INSTALL_TYPE: 'pip'
- RUNNER_OS: 'windows'
QT_LIB: 'pyqt6'
- RUNNER_OS: 'macos'
PYTHON_VERSION: '3.10'
- RUNNER_OS: 'macos'
PYTHON_VERSION: '3.11'
- RUNNER_OS: 'macos'
PYTHON_VERSION: '3.12'
- RUNNER_OS: 'macos'
INSTALL_TYPE: 'pip'
- RUNNER_OS: 'macos'
QT_LIB: 'pyqt6'
steps:
- name: Checkout branch
uses: actions/checkout@v6
- name: Install Linux packages
if: matrix.RUNNER_OS == 'ubuntu'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libegl1
- name: Install Conda and dependencies
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
auto-update-conda: false
auto-activate-base: false
miniforge-version: latest
mamba-version: '*'
channels: conda-forge
channel-priority: true
conda-remove-defaults: 'true'
python-version: ${{ matrix.PYTHON_VERSION }}
environment-file: ${{ matrix.REQUIREMENTS_FILE }} # Need to set up dependencies in the same step due to https://github.com/conda-incubator/setup-miniconda/issues/371
- name: Install dependencies with Pip
if: matrix.INSTALL_TYPE == 'pip'
run: |
pip install -e .[test]
pip install ${{ matrix.QT_DEPS }} ${{ matrix.COVERAGE_DEPS }}
- name: Show environment information
run: |
conda info
conda list
pip list
- name: Run tests
run: ${{ matrix.SPECIAL_INVOCATION }}pytest -vv -s --full-trace --color=yes ${{ matrix.PYTEST_COVERAGE_ARGS }} qtconsole
- name: Upload coverage to Coveralls
if: matrix.COVERAGE == 'True'
run: coveralls

check:
name: Check job status
if: always()

needs:
- test

runs-on: ubuntu-latest

steps:
- name: Determine if all required jobs succeeded
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
51 changes: 0 additions & 51 deletions .github/workflows/windows-tests.yml

This file was deleted.

7 changes: 7 additions & 0 deletions requirements/pip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
channels:
- conda-forge
dependencies:
# Main dependencies
- pip
- python
- wheel