Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:

jobs:
claude-review:
# Fork PRs do not receive the OIDC token/secrets required by
# anthropics/claude-code-action on pull_request workflows.
if: github.event.pull_request.head.repo.full_name == github.repository
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
Expand Down Expand Up @@ -41,4 +44,3 @@ jobs:
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options

59 changes: 59 additions & 0 deletions .github/workflows/project-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Project Checks

on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read

concurrency:
group: project-checks-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test-i18n-build:
name: Tests, i18n, and build
runs-on: ubuntu-latest
timeout-minutes: 15
env:
CI: true
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
SUPERCMD_SKIP_ELECTRON_TESTS: '1'

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: package-lock.json

- name: Install dependencies without native postinstall scripts
# package.json pins darwin esbuild packages for release packaging; --force lets Ubuntu install the lockfile.
run: npm ci --ignore-scripts --force

- name: Run tests
run: npm test

- name: Check i18n
run: npm run check:i18n

- name: Build main process
run: npm run build:main

- name: Typecheck renderer
run: npm exec -- tsc -p tsconfig.renderer.json --noEmit

- name: Build renderer
run: npm run build:renderer
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
cache: npm

- name: Install dependencies
run: npm ci
run: npm ci --force

- name: Run node test suite
run: npm test
5 changes: 5 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
allowBuilds:
electron: true
esbuild: true
extract-file-icon: true
node-window-manager: true
7 changes: 5 additions & 2 deletions scripts/check-i18n.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import path from 'path';

const localesDir = path.resolve('src/renderer/src/i18n/locales');
const baseLocale = 'en';
const strictLocales = new Set((process.env.SUPERCMD_STRICT_LOCALES || 'ko').split(',').map((item) => item.trim()).filter(Boolean));
const localeFiles = fs.readdirSync(localesDir).filter((file) => file.endsWith('.json') && file !== `${baseLocale}.json`).sort();
const defaultStrictLocales = localeFiles.map((file) => file.replace(/\.json$/, ''));
const strictLocales = new Set(
(process.env.SUPERCMD_STRICT_LOCALES || defaultStrictLocales.join(',')).split(',').map((item) => item.trim()).filter(Boolean),
);

function isObject(value) {
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
Expand Down Expand Up @@ -41,7 +45,6 @@ function walk(baseNode, localeNode, currentPath, result) {
}

const baseMessages = JSON.parse(fs.readFileSync(path.join(localesDir, `${baseLocale}.json`), 'utf8'));
const localeFiles = fs.readdirSync(localesDir).filter((file) => file.endsWith('.json') && file !== `${baseLocale}.json`);

let hasStrictFailure = false;

Expand Down
Loading
Loading