-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 2.41 KB
/
Copy pathci.yml
File metadata and controls
73 lines (63 loc) · 2.41 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
name: ci
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
# Queue instead of cancel: a second session pushes to this branch frequently, and
# cancel-in-progress kept killing the (slower) Linux job before it finished. Public
# repo → unlimited free minutes, so letting runs complete costs nothing.
cancel-in-progress: false
jobs:
test:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 25 # hard ceiling so a hang fails fast instead of burning hours
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
env:
# Fixed, cacheable model dir (cross-platform; ~ doesn't expand reliably on Windows).
HF_HOME: ${{ github.workspace }}/.hf-cache
steps:
- uses: actions/checkout@v4
- name: Install uv (pin Python 3.12)
uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
enable-cache: true
- name: Cache Hugging Face models (clip-b32)
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.hf-cache
key: hf-${{ runner.os }}-clip-b32-v1
# Linux clipboard tool (xclip) + a virtual display (xvfb) so the headless runner
# can actually exercise the X11 clipboard branch; dbus for the reveal path.
- name: Linux GUI deps
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y xclip xvfb dbus-x11
- name: Install Muser
shell: bash
run: |
uv venv
uv pip install -e .
# Verify the Apple-only extra RESOLVES on every OS (no-op off Apple Silicon).
uv pip install -e ".[mac]"
uv pip install pytest pytest-timeout
# --timeout fails (with a stack dump of the hung thread) instead of hanging the job.
- name: Test — Linux (under virtual display)
if: runner.os == 'Linux'
shell: bash
run: xvfb-run -a uv run --no-sync python -m pytest tests/ -v --timeout=180 --timeout-method=thread
- name: Test — macOS / Windows
if: runner.os != 'Linux'
shell: bash
run: uv run --no-sync python -m pytest tests/ -v --timeout=180 --timeout-method=thread
- name: Smoke — CLI entrypoints resolve
shell: bash
run: |
uv run --no-sync muser --help
uv run --no-sync muser models