Files
margin-docs/.github/workflows/ci.yml
T
pj 7e499e894a Run CI on macOS
The scaffold copied margin-calendar's workflow, which builds for Linux too. This app is
macOS only, and two tests say so: trash_does_not_hard_delete asserts $HOME/.Trash, and
fits.test.ts enumerates chords from the primary modifier the user agent implies.
2026-08-28 09:28:05 +05:30

58 lines
1.5 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
frontend:
# macOS, not Linux. The keymap layer resolves the primary modifier from the user agent, so on a
# Linux runner `fits.test.ts` enumerates Ctrl chords and compares them against the Command ones
# the app actually binds. The app is macOS only; CI runs where it ships.
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 26
- uses: pnpm/action-setup@v6
with:
version: 10
- run: pnpm install --frozen-lockfile
# `pnpm build` is tsc then vite, so this is the typecheck and the bundle in one step.
- run: pnpm build
- run: pnpm test
rust:
# Same reason, more sharply: `trash_does_not_hard_delete` asserts the file lands in
# `$HOME/.Trash`, which is where macOS puts it and not where Linux does.
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
# tauri_build::build() wants a frontendDist that exists. The example file is what a fresh
# clone compiles against, so that is what CI uses.
- name: Stub the build inputs
run: mkdir -p dist && touch dist/index.html
- name: Test
working-directory: src-tauri
run: cargo test