-
Notifications
You must be signed in to change notification settings - Fork 29
75 lines (65 loc) · 2.16 KB
/
Copy pathtest_pull_request.yml
File metadata and controls
75 lines (65 loc) · 2.16 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
# Reference: napari/napari github workflows
name: test PR
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, edited]
branches:
- main
pull_request_review:
types: [submitted]
jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python }} ${{ matrix.backend }}
if: github.event.pull_request.draft == false
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
include:
- platform: ubuntu-latest
python: "3.11"
backend: pyside6
coverage: true
- platform: ubuntu-latest
python: "3.12"
backend: pyqt5
- platform: ubuntu-latest
python: "3.13"
backend: pyqt5
- platform: macos-latest
python: "3.13"
backend: pyqt5
# - platform: windows-latest
# python: "3.13"
# backend: pyside6
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.13.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v6
# see https://github.com/actions/runner-images/issues/709#issuecomment-612569242
- name: Workaround to free up space on github runner
if: runner.os == 'Linux'
run: sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python }}
enable-cache: true
- name: Setup headless display
if: runner.os == 'Linux'
uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3
with:
qt: true
wm: herbstluftwm
- name: Run pre-commit
run: uvx pre-commit run --all-files
- name: Testing
run: uv run --extra test --extra ml --with "${{ matrix.backend }}" pytest -v --color=yes --cov=ultrack --cov-report=xml --durations=15 .
env:
PLATFORM: ${{ matrix.platform }}
BACKEND: ${{ matrix.backend }}
- name: Coverage
if: ${{ matrix.coverage }}
uses: codecov/codecov-action@v6