-
Notifications
You must be signed in to change notification settings - Fork 55
55 lines (50 loc) · 2.05 KB
/
test-with-edm.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
# This workflow targets stable released dependencies from EDM.
# Note that some packages may not actually be installed from EDM but from
# PyPI, see etstool.py implementations.
name: Test with EDM
on: pull_request
env:
INSTALL_EDM_VERSION: 3.5.0
QT_MAC_WANTS_LAYER: 1
jobs:
# Test against EDM packages
test-with-edm:
strategy:
matrix:
# Note: MacOS support is contingent on not hitting any issues with
# unsupported CPU features such as AVX2 and so may be unstable.
os: [ubuntu-latest, macos-latest, windows-latest]
toolkit: ['pyside6']
fail-fast: false
timeout-minutes: 20 # should be plenty, it's usually < 5
runs-on: ${{ matrix.os }}
env:
# Set root directory, mainly for Windows, so that the EDM Python
# environment lives in the same drive as the cloned source. Otherwise
# 'pip install' raises an error while trying to compute
# relative path between the site-packages and the source directory.
EDM_ROOT_DIRECTORY: ${{ github.workspace }}/.edm
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@v3
with:
path: ~/.cache
key: ${{ runner.os }}-${{ matrix.toolkit }}-${{ hashFiles('etstool.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 etstool.py install --toolkit=${{ matrix.toolkit }}
- name: Run tests (Linux)
if: matrix.os == 'ubuntu-latest'
run: xvfb-run -a edm run -- python etstool.py test --toolkit=${{ matrix.toolkit }}
- name: Run tests (not Linux)
if: matrix.os != 'ubuntu-latest'
run: edm run -- python etstool.py test --toolkit=${{ matrix.toolkit }}