-
Notifications
You must be signed in to change notification settings - Fork 85
52 lines (47 loc) · 1.57 KB
/
run-traits-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
name: Tests
on:
- pull_request
- workflow_dispatch
env:
# Temporary workaround prior to release of TraitsUI 8.0
# xref: enthought/traits#1742
ETS_QT4_IMPORTS: 1
jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Linux packages for Qt 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@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies and local packages
run: |
python -m pip install .[test]
- name: Create clean test directory
run: |
mkdir testdir
- name: Test Traits package (Linux)
run: cd testdir && xvfb-run -a python -m unittest discover -v traits
if: matrix.os == 'ubuntu-latest'
- name: Test Traits package (Windows/macOS)
run: cd testdir && python -m unittest discover -v traits
if: matrix.os != 'ubuntu-latest'