-
Notifications
You must be signed in to change notification settings - Fork 26
82 lines (75 loc) · 2.66 KB
/
ets-from-source.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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.4.0
QT_MAC_WANTS_LAYER: 1
jobs:
# Test against EDM packages
test-with-edm:
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
runtime: ['3.8']
toolkit: ['null', 'pyside6']
runs-on: ${{ matrix.os }}
steps:
- name: Clone the Envisage source
uses: actions/checkout@v4
- name: Install packages for Qt support
uses: ./.github/actions/install-qt-support
- name: Cache EDM packages
uses: actions/cache@v4
with:
path: ~/.cache
key: ${{ runner.os }}-${{ matrix.runtime }}-${{ matrix.toolkit }}-${{ hashFiles('etstool.py') }}
- name: Set up EDM
uses: enthought/setup-edm-action@v3
with:
edm-version: ${{ env.INSTALL_EDM_VERSION }}
- name: Set up bootstrap Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: '.github/workflows/bootstrap-requirements.txt'
- name: Install click to the bootstrap environment
run: python -m pip install -r .github/workflows/bootstrap-requirements.txt
- name: Install test environment
run: python etstool.py install --runtime=${{ matrix.runtime }} --toolkit=${{ matrix.toolkit }} --source
- name: Run tests (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: xvfb-run -a python etstool.py test --runtime=${{ matrix.runtime }} --toolkit=${{ matrix.toolkit }}
- name: Run tests (not Ubuntu)
if: matrix.os != 'ubuntu-latest'
run: python etstool.py test --runtime=${{ matrix.runtime }} --toolkit=${{ matrix.toolkit }}
notify-on-failure:
needs: test-with-edm
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-with-edm
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 }}