@@ -32,11 +32,15 @@ jobs:
3232 - 'crates/**'
3333 - 'Cargo.toml'
3434 - 'Cargo.lock'
35+ - 'rust-toolchain.toml'
36+ - 'deny.toml'
37+ - '.github/workflows/ci.yml'
3538 - 'scripts/run-tests.sh'
36- - 'Justfile '
39+ - 'justfile '
3740 desktop:
3841 - 'desktop/**'
3942 - '!desktop/src-tauri/**'
43+ - 'pnpm-lock.yaml'
4044 desktop-rust:
4145 - 'desktop/src-tauri/**'
4246 web:
7983 - name : Install cargo-nextest
8084 uses : taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 # v2
8185 with :
82- tool : cargo-nextest
86+ tool : cargo-nextest@0.9.136
8387 - name : Unit tests
84- run : cargo nextest run -p sprout-core -p sprout-auth --lib
88+ run : just test-unit
8589
8690 desktop :
8791 name : Desktop
@@ -122,10 +126,13 @@ jobs:
122126 libxdo-dev \
123127 patchelf \
124128 wget
125- - name : Cache pnpm store
126- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
129+ - name : Get pnpm store directory
130+ id : pnpm-cache
131+ run : echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
132+ - name : Restore pnpm store cache
133+ uses : actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
127134 with :
128- path : ~/.local/share/ pnpm/store/v3
135+ path : ${{ steps. pnpm-cache.outputs.STORE_PATH }}
129136 key : pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
130137 restore-keys : pnpm-${{ runner.os }}-
131138 - name : Install desktop dependencies
@@ -169,13 +176,19 @@ jobs:
169176 desktop/playwright-report
170177 desktop/test-results
171178 if-no-files-found : ignore
179+ - name : Save pnpm store cache
180+ if : github.event_name == 'push'
181+ uses : actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
182+ with :
183+ path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
184+ key : pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
172185
173186 desktop-e2e-integration :
174187 name : Desktop E2E Integration
175188 runs-on : ubuntu-latest
176189 timeout-minutes : 45
177190 needs : [changes]
178- if : github.event_name == 'push' || needs.changes.outputs.desktop == 'true' || needs.changes.outputs.rust == 'true'
191+ if : github.event_name == 'push' || needs.changes.outputs.desktop == 'true' || needs.changes.outputs.desktop-rust == 'true' || needs.changes.outputs. rust == 'true'
179192 permissions :
180193 contents : read
181194 steps :
@@ -186,25 +199,15 @@ jobs:
186199 workspaces : |
187200 .
188201 desktop/src-tauri
189- - name : Restore Docker image cache
190- uses : actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
191- with :
192- path : /tmp/docker-cache
193- key : docker-${{ hashFiles('docker-compose.yml') }}
194- restore-keys : docker-
195- - name : Load cached Docker images
196- run : |
197- if [ -d /tmp/docker-cache ]; then
198- for img in /tmp/docker-cache/*.tar; do
199- docker load < "$img" 2>/dev/null || true
200- done
201- fi
202202 - name : Start integration services
203- run : docker compose up -d
204- - name : Cache pnpm store
205- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
203+ run : docker compose up -d postgres redis typesense
204+ - name : Get pnpm store directory
205+ id : pnpm-cache
206+ run : echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
207+ - name : Restore pnpm store cache
208+ uses : actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
206209 with :
207- path : ~/.local/share/ pnpm/store/v3
210+ path : ${{ steps. pnpm-cache.outputs.STORE_PATH }}
208211 key : pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
209212 restore-keys : pnpm-${{ runner.os }}-
210213 - name : Install desktop dependencies
@@ -301,19 +304,12 @@ jobs:
301304 desktop/test-results
302305 /tmp/sprout-relay.log
303306 if-no-files-found : ignore
304- - name : Save Docker image cache
305- if : github.event_name == 'push'
306- run : |
307- mkdir -p /tmp/docker-cache
308- docker save postgres:17-alpine > /tmp/docker-cache/postgres.tar
309- docker save redis:7-alpine > /tmp/docker-cache/redis.tar
310- docker save typesense/typesense:27.1 > /tmp/docker-cache/typesense.tar
311- - name : Upload Docker image cache
307+ - name : Save pnpm store cache
312308 if : github.event_name == 'push'
313309 uses : actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
314310 with :
315- path : /tmp/docker -cache
316- key : docker -${{ hashFiles('docker-compose.yml ') }}
311+ path : ${{ steps.pnpm -cache.outputs.STORE_PATH }}
312+ key : pnpm -${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml ') }}
317313
318314 web :
319315 name : Web
@@ -326,10 +322,13 @@ jobs:
326322 steps :
327323 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
328324 - uses : cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1
329- - name : Cache pnpm store
330- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
325+ - name : Get pnpm store directory
326+ id : pnpm-cache
327+ run : echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
328+ - name : Restore pnpm store cache
329+ uses : actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
331330 with :
332- path : ~/.local/share/ pnpm/store/v3
331+ path : ${{ steps. pnpm-cache.outputs.STORE_PATH }}
333332 key : pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
334333 restore-keys : pnpm-${{ runner.os }}-
335334 - name : Install dependencies
@@ -338,6 +337,12 @@ jobs:
338337 run : just web-check
339338 - name : Web build
340339 run : just web-build
340+ - name : Save pnpm store cache
341+ if : github.event_name == 'push'
342+ uses : actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
343+ with :
344+ path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
345+ key : pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
341346
342347 mobile :
343348 name : Mobile
@@ -416,6 +421,7 @@ jobs:
416421 - uses : Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
417422 with :
418423 key : cross-${{ matrix.target }}
424+ save-if : ${{ github.event_name != 'pull_request' }}
419425 - name : Install cross
420426 uses : taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 # v2
421427 with :
@@ -447,6 +453,7 @@ jobs:
447453 - uses : Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
448454 with :
449455 workspaces : desktop/src-tauri
456+ save-if : ${{ github.event_name != 'pull_request' }}
450457 - name : Install desktop dependencies
451458 run : just desktop-install-ci
452459 - name : Create sidecar placeholders
0 commit comments