-
Notifications
You must be signed in to change notification settings - Fork 1
153 lines (123 loc) · 4.14 KB
/
ci.yml
File metadata and controls
153 lines (123 loc) · 4.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: CI
on:
pull_request:
branches:
- main
- dev
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main
permissions:
contents: read
pull-requests: read
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-24.04
outputs:
docs: ${{ steps.filter.outputs.docs }}
gui: ${{ steps.filter.outputs.gui }}
steps:
- uses: actions/checkout@v6
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
docs:
- 'doc/**'
- '.github/actions/setup-node-pnpm/action.yml'
- '.github/workflows/ci.yml'
- '.github/workflows/docs.yml'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'xtask/**'
gui:
- 'gui/**'
- '.github/actions/build-gui-platform/action.yml'
- '.github/actions/setup-tauri/action.yml'
- '.github/workflows/ci.yml'
- '.github/workflows/release.yml'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'xtask/**'
validate-monorepo:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-node-pnpm
- uses: ./.github/actions/setup-rust
with:
cache-key: ci
- name: Lint
run: cargo run -p xtask -- lint
- name: Typecheck
run: cargo run -p xtask -- check-type
- name: Build
run: cargo run -p xtask -- build
- name: Rust unit tests
run: cargo test --workspace --exclude tnmsg --exclude tnmsc-integrate-tests --exclude tnmsc-local-tests --exclude tnmsm-integrate-tests --lib --bins
packaging-smoke:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-node-pnpm
- uses: ./.github/actions/setup-rust
with:
cache-key: ci-packaging-smoke
- name: Build release binaries (for packaging smoke)
run: cargo build --release -p tnmsc -p tnmsm
- name: CLI packaging smoke
run: cargo test -p tnmsc-integrate-tests packaging_smoke_covers_release_binary_and_global_install -- --exact --nocapture
- name: MCP packaging smoke
run: cargo test -p tnmsm-integrate-tests packaging_smoke_covers_release_binary_and_global_install -- --exact --nocapture
gui-smoke:
needs: changes
if: |
(github.event_name != 'pull_request' || github.event.pull_request.draft == false) &&
needs.changes.outputs.gui == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-node-pnpm
- name: Read GUI version
id: gui-version
run: |
version="$(node -p 'require("./gui/package.json").version')"
echo "version=$version" >> "$GITHUB_OUTPUT"
- uses: ./.github/actions/setup-tauri
with:
version: ${{ steps.gui-version.outputs.version }}
- name: Build GUI
run: cargo run -p xtask -- gui-build
- name: Test GUI
run: pnpm -C gui test
docs-check:
needs: changes
if: |
(github.event_name != 'pull_request' || github.event.pull_request.draft == false) &&
needs.changes.outputs.docs == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-node-pnpm
with:
install-filter: "@truenine/memory-sync-docs..."
- name: Validate docs content
run: pnpm -C doc run validate:content
- name: Lint docs
run: pnpm -C doc run lint
- name: Typecheck docs
run: pnpm -C doc run check:type
- name: Build docs
run: pnpm -C doc run build