Test installation from PyPI #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test installation from PyPI | |
on: | |
workflow_dispatch: | |
schedule: | |
# Run at 05:27 UTC on the 6th and 20th of every month | |
- cron: '27 5 6,20 * *' | |
jobs: | |
test-pypi-sdist: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Linux packages for Qt 5 support | |
run: | | |
sudo apt-get update | |
sudo apt-get install libegl1 | |
sudo apt-get install libxkbcommon-x11-0 | |
sudo apt-get install libxcb-cursor0 | |
sudo apt-get install libxcb-icccm4 | |
sudo apt-get install libxcb-image0 | |
sudo apt-get install libxcb-keysyms1 | |
sudo apt-get install libxcb-randr0 | |
sudo apt-get install libxcb-render-util0 | |
sudo apt-get install libxcb-shape0 | |
if: matrix.os == 'ubuntu-latest' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install package and test dependencies from PyPI sdist (with PySide6) | |
run: | | |
python -m pip install --no-binary traits-futures traits-futures[pyside6] | |
if: ${{ matrix.python-version != '3.11' }} | |
- name: Install package and test dependencies from PyPI sdist (no PySide6) | |
# PySide6 does not yet work on Python 3.11; test without it. | |
run: | | |
python -m pip install --no-binary traits-futures traits-futures | |
if: ${{ matrix.python-version == '3.11' }} | |
- name: Create clean test directory | |
run: | | |
mkdir testdir | |
- name: Run the test suite (Linux) | |
run: cd testdir && xvfb-run -a python -X faulthandler -m unittest discover -v traits_futures | |
if: matrix.os == 'ubuntu-latest' | |
- name: Run the test suite (Windows/macOS) | |
run: cd testdir && python -X faulthandler -m unittest discover -v traits_futures | |
if: matrix.os != 'ubuntu-latest' | |
test-pypi-wheel: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Linux packages for Qt 5 support | |
run: | | |
sudo apt-get update | |
sudo apt-get install libegl1 | |
sudo apt-get install libxkbcommon-x11-0 | |
sudo apt-get install libxcb-cursor0 | |
sudo apt-get install libxcb-icccm4 | |
sudo apt-get install libxcb-image0 | |
sudo apt-get install libxcb-keysyms1 | |
sudo apt-get install libxcb-randr0 | |
sudo apt-get install libxcb-render-util0 | |
sudo apt-get install libxcb-shape0 | |
if: matrix.os == 'ubuntu-latest' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install package and test dependencies from PyPI wheel (with PySide6) | |
run: | | |
python -m pip install --only-binary traits-futures traits-futures[pyside6] | |
if: ${{ matrix.python-version != '3.11' }} | |
- name: Install package and test dependencies from PyPI wheel (no PySide6) | |
# PySide6 does not yet work on Python 3.11; test without it. | |
run: | | |
python -m pip install --only-binary traits-futures traits-futures | |
if: ${{ matrix.python-version == '3.11' }} | |
- name: Create clean test directory | |
run: | | |
mkdir testdir | |
- name: Run the test suite (Linux) | |
run: cd testdir && xvfb-run -a python -X faulthandler -m unittest discover -v traits_futures | |
if: matrix.os == 'ubuntu-latest' | |
- name: Run the test suite (Windows/macOS) | |
run: cd testdir && python -X faulthandler -m unittest discover -v traits_futures | |
if: matrix.os != 'ubuntu-latest' |