Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:construction_worker: Run language validation during prerelease packaging

Danielbea021c2dc09
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index 3e462cd9bb..12d8a5ef70 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -105,6 +105,22 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ languages:
+ name: Language validation
+ needs: prepare
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ steps:
+ - uses: actions/checkout@v6
+ - uses: actions/setup-python@v6
+ with:
+ python-version: '3.x'
+ - name: Test language validation
+ run: python -m unittest discover -s scripts -p "test_check_lang_keys.py"
+ - name: Check language keys and kernel placeholders
+ run: python scripts/check-lang-keys.py
+
contracts:
name: API contracts and kernel tests
needs: prepare
@@ -173,7 +189,7 @@ jobs:
build:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.name }}
- needs: [prepare, contracts, frontend-tests]
+ needs: [prepare, languages, contracts, frontend-tests]
env:
SIYUAN_E2E_SHARDS: ${{ matrix.config.e2e_shards }}
strategy:
@@ -520,7 +536,7 @@ jobs:
runs-on: ubuntu-latest
name: ubuntu build android.apk
# 测试通过后并行执行 Android 和桌面构建,全部成功后汇总产物并创建发布。
- needs: [prepare, contracts, frontend-tests]
+ needs: [prepare, languages, contracts, frontend-tests]
steps:
- name: Checkout code
uses: actions/checkout@v6
diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml
deleted file mode 100644
index cc9e1e851d..0000000000
--- a/.github/workflows/i18n.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: Language validation
-
-on:
- pull_request:
- push:
- branches: [dev, master]
-
-permissions:
- contents: read
-
-jobs:
- languages:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-python@v6
- with:
- python-version: '3.x'
- - name: Test language validation
- run: python -m unittest discover -s scripts -p "test_check_lang_keys.py"
- - name: Check language keys and kernel placeholders
- run: python scripts/check-lang-keys.py
diff --git a/docs/API-CONTRACTS.md b/docs/API-CONTRACTS.md
index 0dfbbae1dd..44c64a4f14 100644
--- a/docs/API-CONTRACTS.md
+++ b/docs/API-CONTRACTS.md
@@ -177,4 +177,4 @@ go test -tags "fts5 sqlcipher" ./... -count=1
Import and static-file fixtures use `internal/testutil.PublicDataDir` to create and clean up explicitly validated non-sensitive directories independently of `TMPDIR` and `GOTMPDIR`. The helper tries the user home, current directory, and filesystem root, and reports a fixture setup failure if none is safe and writable. CI also reruns the affected path tests with `/tmp` as `TMPDIR` and a separate `GOTMPDIR` to cover environment overrides.
-The prerelease workflow `.github/workflows/cd.yml` runs contract and type checks, all kernel packages on Linux, and all frontend, Electron, and packaging-script tests on Windows. These checks run only for prerelease tag pushes (`*-alpha*`, `*-beta*`, `*-rc*`) or manual dispatch of this workflow; ordinary branch pushes and pull requests do not trigger them. Desktop and Android packaging require both test jobs to pass. Frontend discovery is restricted to `src/**/*.test.ts`, `tests/**/*.test.js`, `electron/**/*.test.js`, and `scripts/**/*.test.js`, so packaged copies under `app/build` are excluded. Test files run serially to avoid Electron process startup contention. New regression tests in these locations are included automatically; update the test command and this document when adding a new test location or filename convention. Keep `Contract` in Go contract regression test names so they remain easy to run separately.
+The prerelease workflow `.github/workflows/cd.yml` runs language validation, contract and type checks, all kernel packages on Linux, and all frontend, Electron, and packaging-script tests on Windows. These checks run only for prerelease tag pushes (`*-alpha*`, `*-beta*`, `*-rc*`) or manual dispatch of this workflow; ordinary branch pushes and pull requests do not trigger them. Desktop and Android packaging require all three validation and test jobs to pass. Frontend discovery is restricted to `src/**/*.test.ts`, `tests/**/*.test.js`, `electron/**/*.test.js`, and `scripts/**/*.test.js`, so packaged copies under `app/build` are excluded. Test files run serially to avoid Electron process startup contention. New regression tests in these locations are included automatically; update the test command and this document when adding a new test location or filename convention. Keep `Contract` in Go contract regression test names so they remain easy to run separately.