-
Notifications
You must be signed in to change notification settings - Fork 85
82 lines (75 loc) · 2.57 KB
/
test-from-pypi.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 installation from PyPI
on:
workflow_dispatch:
schedule:
# Run at 03:27 UTC on the 8th and 22nd of every month
- cron: '27 3 8,22 * *'
jobs:
test-pypi-sdist:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
platform:
- os: ubuntu-latest
architecture: x64
- os: windows-latest
architecture: x64
- os: windows-latest
architecture: x86
- os: macos-latest
architecture: arm64
- os: macos-13
architecture: x64
runs-on: ${{ matrix.platform.os }}
steps:
- name: Set up Python ${{ matrix.python-version }} (${{ matrix.platform.architecture }})
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.architecture }}
allow-prereleases: true
- name: Install test dependencies and Traits from PyPI sdist
run: |
python -m pip install --no-binary traits defusedxml numpy setuptools Sphinx traits traitsui
- name: Create clean test directory
run: |
mkdir testdir
- name: Test Traits package
run: cd testdir && python -m unittest discover -v traits
test-pypi-wheel:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
python-architecture: [x86, x64, arm64]
exclude:
- os: ubuntu-latest
python-architecture: arm64
- os: ubuntu-latest
python-architecture: x86
- os: windows-latest
python-architecture: arm64
- os: macos-latest
python-architecture: x86
- os: macos-latest
python-architecture: x64
- os: macos-13
python-architecture: x86
- os: macos-13
python-architecture: arm64
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python ${{ matrix.python-version }} (${{ matrix.python-architecture }})
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-architecture }}
allow-prereleases: true
- name: Install test dependencies and Traits from PyPI wheel
run: |
python -m pip install --only-binary traits defusedxml numpy setuptools Sphinx traits traitsui
- name: Create clean test directory
run: |
mkdir testdir
- name: Test Traits package
run: cd testdir && python -m unittest discover -v traits