-
-
Notifications
You must be signed in to change notification settings - Fork 331
69 lines (64 loc) · 2.12 KB
/
Copy pathtest.yml
File metadata and controls
69 lines (64 loc) · 2.12 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
name: Test
on:
push:
branches: ['main']
pull_request:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
rust:
name: Rust
runs-on: ubuntu-latest
steps:
# refer: https://v2.tauri.app/start/prerequisites/#linux
- run: |
sudo apt update
sudo apt install --no-install-recommends \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
fonts-noto-cjk \
dbus-x11 \
gnome-keyring
- uses: actions/checkout@v7
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
# The integration-tests crate prepares a shared llama.cpp runtime once
# per `cargo test` invocation under `tests/integration-tests/.cache`;
# caching that directory across runs avoids re-downloading the dylib
# on every PR.
- uses: actions/cache@v6
with:
path: tests/integration-tests/.cache
key: ${{ runner.os }}-integration-runtime-${{ hashFiles('koharu-runtime/**/*.rs', 'koharu-llm/**/*.rs') }}
restore-keys: ${{ runner.os }}-integration-runtime-
- name: Run workspace tests (unit + integration)
run: |
# Headless dbus + gnome-keyring so the provider-secret integration
# tests can talk to secret-service on Linux runners.
eval "$(dbus-launch --sh-syntax)"
echo -n "" | gnome-keyring-daemon --unlock --components=secrets &>/dev/null &
export $(echo -n "" | gnome-keyring-daemon --start --components=secrets 2>/dev/null)
cargo test --workspace --tests
ui:
name: UI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
- uses: actions/cache@v6
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
- run: bun install --frozen-lockfile
- name: Run Vitest
run: bun run --filter ui test