-
Notifications
You must be signed in to change notification settings - Fork 2
106 lines (96 loc) · 3.31 KB
/
weekly-scheduled-tests.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Integration tests
on:
workflow_dispatch:
schedule:
# Run at 04:35 UTC every Sunday
- cron: '35 4 * * 0'
env:
PYTHONUNBUFFERED: 1
jobs:
test-all-platform-python-combinations:
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: Check out the target commit
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and local packages
run: |
python -m pip install .
- name: Run the test suite
run: |
mkdir testdir
cd testdir
python -X faulthandler -m unittest discover -v traits_futures
test-bleeding-edge:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.10']
runs-on: ${{ matrix.os }}
steps:
- name: Check out the main branch
uses: actions/checkout@v4
- name: Install Linux packages for PySide6 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 dependencies and local packages
run: |
python -m pip install git+https://github.com/enthought/traits
python -m pip install git+https://github.com/enthought/pyface
python -m pip install .[pyside6]
- 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'
notify-on-failure:
needs: [test-all-platform-python-combinations, test-bleeding-edge]
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-all-platform-python-combinations, test-bleeding-edge]
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 }}