-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (65 loc) · 1.99 KB
/
ci.yml
File metadata and controls
79 lines (65 loc) · 1.99 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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
# Cancel in-flight runs for the same ref/PR — pushing again should supersede
# whatever's still queued, especially with three-OS runs in flight.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
# Don't cancel sibling OSes when one fails — each platform's failure is
# independently informative (esp. once Phase 6 Windows registry lands).
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v5
# Tauri 2's Rust crate links against system webkit/glib on Linux even
# for `cargo test --lib`, since the lib pulls in tauri's default
# features. Package list mirrors the upstream prerequisites doc:
# https://v2.tauri.app/start/prerequisites/
- name: Install Tauri system deps (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: '22'
cache: 'npm'
- name: Install npm deps
run: npm ci
- name: Frontend unit tests
run: npm run test:unit
- name: Catalog sync tests
run: npm test
- name: tsc + vite build
run: npm run build
- name: Rust unit tests
working-directory: src-tauri
run: cargo test --lib