-
Notifications
You must be signed in to change notification settings - Fork 22
136 lines (119 loc) · 3.59 KB
/
test.yml
File metadata and controls
136 lines (119 loc) · 3.59 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: CI
on:
push:
branches: [main]
pull_request: {}
workflow_dispatch:
schedule:
- cron: "0 0 * * 0" # run once a week
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-manifest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: pipx run check-manifest
test:
name: Test ${{ matrix.qt }} ${{ matrix.os }} py${{ matrix.python-version }} mypyc-${{ matrix.compile }}
runs-on: ${{ matrix.os }}
env:
HATCH_BUILD_HOOKS_ENABLE: ${{ matrix.compile }}
UV_NO_SYNC: "1"
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12", "3.14"]
os: [ubuntu-latest, macos-latest, windows-latest]
compile: ["1", "0"]
qt: [""]
include:
- os: ubuntu-latest
python-version: "3.11"
compile: "1"
- os: ubuntu-latest
python-version: "3.13"
compile: "1"
# qt stuff
- os: macos-latest
python-version: "3.11"
qt: "PyQt5"
compile: "0"
- os: windows-latest
python-version: "3.12"
qt: "PySide6"
compile: "1"
- os: ubuntu-latest
python-version: "3.14"
qt: "PyQt6"
compile: "1"
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
cache-dependency-glob: "**/pyproject.toml"
- name: Install the project
run: |
uv sync --no-dev --group test
uv run python -c "import psygnal; print('compiled:', psygnal._compiled)"
- if: matrix.qt != ''
uses: pyvista/setup-headless-display-action@v4
with:
qt: true
- if: matrix.qt != ''
run: |
uv sync --no-dev --group testqt
uv pip install ${{ matrix.qt }}
- name: Test
shell: bash
run: uv run coverage run -p -m pytest -v
- name: Upload coverage
uses: actions/upload-artifact@v6
with:
name: covreport-${{ matrix.os }}-py${{ matrix.python-version }}-mypyc${{ matrix.compile }}-${{ matrix.qt }}
path: ./.coverage*
include-hidden-files: true
upload_coverage:
if: always()
needs: [test]
uses: pyapp-kit/workflows/.github/workflows/upload-coverage.yml@v2
secrets: inherit
test-magicgui:
uses: pyapp-kit/workflows/.github/workflows/test-dependents.yml@main
with:
dependency-repo: pyapp-kit/magicgui
dependency-group: "pyside2"
qt: "pyside2"
python-version: "3.10"
typing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: test
run: uv run --no-dev --group test-typing pytest typesafety --mypy-only-local-stub --color=yes
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install the project
run: |
python -m pip install -U pip
python -m pip install . --group test-codspeed
python -c "import psygnal; print('compiled:', psygnal._compiled)"
env:
HATCH_BUILD_HOOKS_ENABLE: "1"
- name: Run benchmarks
uses: CodSpeedHQ/action@v4
with:
run: pytest --codspeed -v
mode: instrumentation