-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 2.25 KB
/
Copy pathci.yml
File metadata and controls
66 lines (55 loc) · 2.25 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
name: CI
# The four checks CLAUDE.md calls "the pre-commit gate", run on every push to
# main and every PR. release.yml builds only on tags and runs no checks, so
# this is what stands between a broken main and a broken release.
#
# macOS only, for now: the Windows `cargo check` job was removed after the
# v0.3.0 tag build failed on the Windows runner, so nothing here compiles the
# `#[cfg(windows)]` code in `runner/`.
#
# The failure is diagnosed but NOT fixed: the lib's test binary dies at load
# with 0xc0000139 STATUS_ENTRYPOINT_NOT_FOUND because `rfd`'s
# `TaskDialogIndirect` needs a ComCtl32 v6 manifest that `tauri_build` gives to
# the app binary only. `build.rs` carries the full note, including why
# `cargo:rustc-link-arg-tests` is not the answer (cargo rejects it without a
# `tests/` target, and it would not reach the lib's unit-test binary anyway).
#
# So a Windows job here must not run `cargo test`. `cargo check` alone would
# already earn its keep — it is the only thing that would compile the
# `#[cfg(windows)]` code in `runner/` at all.
#
# Order matters (same as locally): `cargo test` must run before `tsc`,
# because it generates the gitignored ts-rs bindings the TS build compiles
# against. `npm run fetch-uv` must come before any Rust step —
# `tauri_build` copies every `externalBin` in `build.rs`, so a missing uv
# sidecar fails even `cargo check`.
on:
push:
branches: [main]
pull_request:
jobs:
checks:
runs-on: macos-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22
cache: npm
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
- run: npm ci
- name: Fetch uv sidecar
run: npm run fetch-uv
# Generates the ts-rs bindings AND runs the Rust suite (the unix-gated
# process tests included — macOS is a unix runner).
- name: Rust tests (+ bindings)
run: cargo test --manifest-path src-tauri/Cargo.toml
- name: Rust check (warning-free)
run: cargo check --manifest-path src-tauri/Cargo.toml
- name: TypeScript typecheck
run: npx tsc --noEmit
- name: Frontend tests
run: npm test