mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-12 08:59:02 +08:00
Remove the explicit `with: version: 9` lines from multiple GitHub Actions workflows (auto-i18n.yml, nightly-build.yml, pr-ci.yml, update-app-upgrade-config.yml, sync-to-gitcode.yml, release.yml). The workflows still call `pnpm/action-setup@v4` but no longer hardcode a pnpm version. This simplifies maintenance and allows the action to resolve an appropriate pnpm version (or use its default) without needing updates whenever the pinned version becomes outdated. It reduces churn when bumping pnpm across CI configs and prevents accidental pin drift between workflow files.
64 lines
1.3 KiB
YAML
64 lines
1.3 KiB
YAML
name: Pull Request CI
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- develop
|
|
- v2
|
|
types: [ready_for_review, synchronize, opened]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
PRCI: true
|
|
if: github.event.pull_request.draft == false
|
|
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Get pnpm store directory
|
|
id: pnpm-cache
|
|
shell: bash
|
|
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache pnpm dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-
|
|
|
|
- name: Install Dependencies
|
|
run: pnpm install
|
|
|
|
- name: Lint Check
|
|
run: pnpm test:lint
|
|
|
|
- name: Format Check
|
|
run: pnpm format:check
|
|
|
|
- name: Type Check
|
|
run: pnpm typecheck
|
|
|
|
- name: i18n Check
|
|
run: pnpm i18n:check
|
|
|
|
- name: Test
|
|
run: pnpm test
|