mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-10 22:38:44 +02:00
* ci: only run what a change affects, consolidate jobs - detect affected plugins from changed files and Cargo.lock dependency trees - test/lint Rust per platform in shards instead of one job per plugin - fold check-generated-files into lint-javascript, fmt into a single job - skip fat LTO in integration test builds, single ABI in test-android * ci: run e2e on bumps, use published tauri CLI, PR-safe pnpm cache - trigger e2e on Cargo/pnpm lockfile and manifest changes - install the latest 2.x tauri-cli with cargo-binstall in integration tests - add setup-pnpm action: restore the store everywhere, save only on v2/v3 * fix clippy, ios build * fix bumps [skip ci]
45 lines
1.7 KiB
YAML
45 lines
1.7 KiB
YAML
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
name: setup pnpm
|
|
description: Installs Node.js, pnpm and the workspace dependencies, restoring the pnpm store from the cache
|
|
|
|
# `pnpm/action-setup`'s own cache saves from every run, pull requests included. An entry saved from
|
|
# a pull request lives on its merge ref, where nothing else can restore it, and every write evicts
|
|
# an entry that other runs would have hit (10 GB repository limit, LRU eviction), so here every run
|
|
# restores the store and only `v2`/`v3` save it.
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 'lts/*'
|
|
|
|
- uses: pnpm/action-setup@v6
|
|
|
|
- id: store
|
|
shell: bash
|
|
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
|
|
|
- id: cache
|
|
uses: actions/cache/restore@v6
|
|
with:
|
|
path: ${{ steps.store.outputs.path }}
|
|
key: pnpm-store-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml') }}
|
|
restore-keys: pnpm-store-${{ runner.os }}-${{ runner.arch }}-
|
|
|
|
- shell: bash
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
# a store restored from an older lockfile still holds the packages it no longer uses
|
|
- if: ${{ (github.ref == 'refs/heads/v2' || github.ref == 'refs/heads/v3') && steps.cache.outputs.cache-hit != 'true' }}
|
|
shell: bash
|
|
run: pnpm store prune
|
|
|
|
- if: ${{ (github.ref == 'refs/heads/v2' || github.ref == 'refs/heads/v3') && steps.cache.outputs.cache-hit != 'true' }}
|
|
uses: actions/cache/save@v6
|
|
with:
|
|
path: ${{ steps.store.outputs.path }}
|
|
key: ${{ steps.cache.outputs.cache-primary-key }}
|