Test with ETS packages from source #121
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 with ETS packages from source | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
# Every Friday at 00:00 UTC | |
- cron: '0 0 * * 5' | |
env: | |
INSTALL_EDM_VERSION: 3.2.3 | |
jobs: | |
# Test against EDM packages from source on Linux | |
test-ets-source-linux: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
toolkit: ['null', 'pyside6'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Qt dependencies | |
uses: ./.github/actions/install-qt-support | |
if: matrix.toolkit != 'wx' | |
- name: Cache EDM packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache | |
key: ${{ runner.os }}-${{ matrix.toolkit }}-${{ hashFiles('ci/edmtool.py') }} | |
- name: Set up EDM | |
uses: enthought/setup-edm-action@v2 | |
with: | |
edm-version: ${{ env.INSTALL_EDM_VERSION }} | |
- name: Install click to the default EDM environment | |
run: edm install -y wheel click coverage | |
- name: Install test environment | |
run: edm run -- python ci/edmtool.py install --runtime=3.8 --toolkit=${{ matrix.toolkit }} --source | |
- name: Run tests | |
# kiva agg requires at least 15-bit color depth. | |
# The --server-args assumes xvfb-run is called, hence Linux only. | |
run: xvfb-run -a --server-args="-screen 0 1024x768x24" edm run -- python ci/edmtool.py test --runtime=3.8 --toolkit=${{ matrix.toolkit }} | |
# Test against EDM packages from source on Windows and OSX | |
test-ets-source: | |
strategy: | |
matrix: | |
os: [windows-latest] | |
toolkit: ['null', 'pyside6'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache EDM packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache | |
key: ${{ runner.os }}-${{ matrix.toolkit }}-${{ hashFiles('ci/edmtool.py') }} | |
- name: Setup EDM | |
uses: enthought/setup-edm-action@v2 | |
with: | |
edm-version: ${{ env.INSTALL_EDM_VERSION }} | |
- name: Install click to the default EDM environment | |
run: edm install -y wheel click coverage | |
- name: Install test environment | |
run: edm run -- python ci/edmtool.py install --runtime=3.8 --toolkit=${{ matrix.toolkit }} --source | |
- name: Run tests | |
run: edm run -- python ci/edmtool.py test --runtime=3.8 --toolkit=${{ matrix.toolkit }} | |
notify-on-failure: | |
needs: [test-ets-source-linux, test-ets-source] | |
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-ets-source-linux, test-ets-source] | |
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 }} |