Skip to content

Run test suite for Qt across all supported versions and OS weekly #63

Run test suite for Qt across all supported versions and OS weekly

Run test suite for Qt across all supported versions and OS weekly #63

Workflow file for this run

name: Run test suite for Qt across all supported versions and OS weekly
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: '0 0 * * 4'
env:
PYTHONUNBUFFERED: 1
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
qt-api: ['pyqt5', 'pyside2', 'pyside6']
exclude:
- python-version: '3.11'
qt-api: 'pyside2'
fail-fast: false
env:
ETS_TOOLKIT: qt
runs-on: ${{ matrix.os }}
timeout-minutes: 20 # should be plenty, it's usually < 5
steps:
- name: Check out the target commit
uses: actions/checkout@v3
- name: Install Qt dependencies
uses: ./.github/actions/install-qt-support
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and local packages
run: |
python -m pip install ".[${{ matrix.qt-api }},editors,examples,test]"
- 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 traitsui
if: matrix.os == 'ubuntu-latest'
- name: Run the test suite (Windows/macOS)
run: cd testdir && python -X faulthandler -m unittest discover -v traitsui
if: matrix.os != 'ubuntu-latest'
notify-on-failure:
needs: test
if: failure()
runs-on: ubuntu-latest
steps:
- name: Notify Slack channel on failure
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: ${{ secrets.ETS_SLACK_CHANNEL_ID }}
status: FAILED
color: danger
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTION_SECRET }}
notify-on-success:
needs: test
if: success()
runs-on: ubuntu-latest
steps:
- name: Notify Slack channel on success
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: ${{ secrets.ETS_BOTS_SLACK_CHANNEL_ID }}
status: SUCCESS
color: good
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTION_SECRET }}