mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
- Rename i18n-related scripts to follow consistent naming pattern (i18n:check, i18n:sync, i18n:auto) - Change default base locale from zh-cn to en-us - Remove unused update-i18n.ts script - Update documentation and CI workflow to reflect script name changes
65 lines
1.4 KiB
YAML
65 lines
1.4 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 || github.head_ref == 'v2'
|
|
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install corepack
|
|
run: corepack enable && corepack prepare yarn@4.6.0 --activate
|
|
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache yarn dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
node_modules
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Install Dependencies
|
|
run: yarn install
|
|
|
|
- name: Lint Check
|
|
run: yarn test:lint
|
|
|
|
- name: Format Check
|
|
run: yarn format:check
|
|
|
|
- name: Type Check
|
|
run: yarn typecheck
|
|
|
|
- name: i18n Check
|
|
run: yarn i18n:check
|
|
|
|
- name: Test
|
|
run: yarn test
|