Integration tests #273
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
# This workflow runs integration tests (e.g. demo examples), which requires | |
# more dependencies | |
name: Integration tests | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 4' | |
jobs: | |
test: | |
if: github.repository == 'enthought/traitsui' | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
toolkit: ['pyside6'] | |
python-version: [3.8, 3.11] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Qt dependencies for Linux | |
uses: ./.github/actions/install-qt-support | |
if: startsWith(matrix.os, 'ubuntu') | |
- name: Install Swig | |
run: sudo apt-get install swig | |
if: startsWith(matrix.os, 'ubuntu') | |
- name: Install Python packages and dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install .[${{ matrix.toolkit }},test,editors] | |
python -m pip install .[examples] | |
- name: Create clean test directory | |
run: | | |
mkdir testdir | |
- name: Run integration tests | |
run: cd testdir && xvfb-run -a python -X faulthandler -m unittest discover -v ${{ github.workspace }}/integrationtests | |
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 }} |