Repository navigation
Expand file tree
/
Copy pathci.workflow.yml
More file actions
75 lines (59 loc) · 2.14 KB
/
Copy pathci.workflow.yml
File metadata and controls
75 lines (59 loc) · 2.14 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
# CI workflow — copy to .github/workflows/ci.yml
# The Pickle GitHub App on this account has no `workflows` permission, so this
# file ships under docs/ instead. Paste it at .github/workflows/ci.yml in the
# GitHub web editor; steps are in docs/ci-setup.md.
name: ci
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
web:
name: web (tsc, vite build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
with:
version: 10
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: 22
cache: pnpm
- name: install
run: pnpm install --frozen-lockfile
- name: typecheck
run: pnpm exec tsc --noEmit
- name: build
run: pnpm build
# src-tauri's lib uses tauri::generate_context!, which embeds frontendDist
# (../dist) at compile time — cargo test cannot build without these files.
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: dist
path: dist
retention-days: 1
rust:
name: rust (cargo test)
needs: web
# macOS on purpose: keyring is built with apple-native/windows-native only,
# so the credential tests need a real OS keychain. Linux would also need the
# webkit2gtk/gtk dev packages just to link the tauri crate.
runs-on: macos-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: dist
path: dist
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2
with:
workspaces: src-tauri -> target
- name: cargo test
run: cargo test --manifest-path src-tauri/Cargo.toml