Merge pull request #1147 from anywhere-labs/ci/skip-duplicate-package-typecheck

ci: skip duplicate typecheck in platform packaging jobs
This commit is contained in:
zp-home
2026-09-23 11:26:48 +08:00
committed by GitHub
5 changed files with 66 additions and 51 deletions
+4 -3
View File
@@ -152,7 +152,8 @@ jobs:
path: ${{ steps.yarn-cache.outputs.dir }}
key: yarn-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('yarn.lock', '.yarnrc.yml') }}
- run: yarn install --immutable
- run: yarn workspace ${{ matrix.workspace }} check:win-package
# Typecheck is platform-neutral and already gated by `check`.
- run: yarn workspace ${{ matrix.workspace }} check:win-package:platform
- name: Build Windows installer
env:
DSH_PACKAGE_CHECK_ALREADY_RAN: '1'
@@ -195,7 +196,7 @@ jobs:
path: ${{ steps.yarn-cache.outputs.dir }}
key: yarn-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('yarn.lock', '.yarnrc.yml') }}
- run: yarn install --immutable
- run: yarn workspace ${{ matrix.workspace }} check:linux-package
- run: yarn workspace ${{ matrix.workspace }} check:linux-package:platform
- name: Build Linux AppImage and Debian package
env:
DSH_PACKAGE_CHECK_ALREADY_RAN: '1'
@@ -228,7 +229,7 @@ jobs:
path: ${{ steps.yarn-cache.outputs.dir }}
key: yarn-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('yarn.lock', '.yarnrc.yml') }}
- run: yarn install --immutable
- run: yarn workspace ${{ matrix.workspace }} check:mac-package
- run: yarn workspace ${{ matrix.workspace }} check:mac-package:platform
- name: Build macOS smoke artifact
env:
DSH_PACKAGE_CHECK_ALREADY_RAN: '1'
+6 -3
View File
@@ -128,9 +128,12 @@
"verify:notices": "node scripts/verify-licenses.mjs --notices THIRD_PARTY_NOTICES.md",
"prepare:electron-native": "node scripts/prepare-fs-ext.ts",
"check": "yarn run build && yarn run typecheck && yarn run test && yarn run verify:closure && yarn run verify:cli && yarn run verify:loader && yarn run verify:profile && yarn run verify:aa && yarn run verify:licenses && yarn run verify:operations",
"check:win-package": "yarn workspace dsh-community-market build && yarn run build && yarn run typecheck && vitest run tests/package.spec.ts tests/package-win.spec.ts tests/desktop-installer-quit.spec.ts tests/installer-nsh.spec.ts tests/update-checker.spec.ts tests/update-download.spec.ts tests/verify-win-installer.spec.ts tests/verify-win-portable.spec.ts tests/verify-packaged-runtime.spec.ts tests/windows-pwsh-sandbox.spec.ts tests/windows-volume-diagnostics.spec.ts tests/window-options.spec.ts tests/safe-mode.spec.ts && yarn run verify:closure",
"check:mac-package": "yarn workspace dsh-community-market build && yarn run build && yarn run typecheck && vitest run tests/package.spec.ts tests/package-mac.spec.ts tests/verify-mac-smoke.spec.ts tests/verify-packaged-runtime.spec.ts tests/mac-universal.spec.ts && yarn run verify:closure",
"check:linux-package": "yarn workspace dsh-community-market build && yarn run build && yarn run typecheck && vitest run tests/package.spec.ts tests/package-linux.spec.ts tests/verify-linux-artifacts.spec.ts tests/verify-packaged-runtime.spec.ts && yarn run verify:closure",
"check:win-package": "yarn run check:win-package:platform && yarn run typecheck",
"check:win-package:platform": "yarn workspace dsh-community-market build && yarn run build && vitest run tests/package.spec.ts tests/package-win.spec.ts tests/desktop-installer-quit.spec.ts tests/installer-nsh.spec.ts tests/update-checker.spec.ts tests/update-download.spec.ts tests/verify-win-installer.spec.ts tests/verify-win-portable.spec.ts tests/verify-packaged-runtime.spec.ts tests/windows-pwsh-sandbox.spec.ts tests/windows-volume-diagnostics.spec.ts tests/window-options.spec.ts tests/safe-mode.spec.ts && yarn run verify:closure",
"check:mac-package": "yarn run check:mac-package:platform && yarn run typecheck",
"check:mac-package:platform": "yarn workspace dsh-community-market build && yarn run build && vitest run tests/package.spec.ts tests/package-mac.spec.ts tests/verify-mac-smoke.spec.ts tests/verify-packaged-runtime.spec.ts tests/mac-universal.spec.ts && yarn run verify:closure",
"check:linux-package": "yarn run check:linux-package:platform && yarn run typecheck",
"check:linux-package:platform": "yarn workspace dsh-community-market build && yarn run build && vitest run tests/package.spec.ts tests/package-linux.spec.ts tests/verify-linux-artifacts.spec.ts tests/verify-packaged-runtime.spec.ts && yarn run verify:closure",
"start": "node lib/bin.js",
"start:isolated": "DSH_DESKTOP_ISOLATED_HOST=1 node lib/bin.js",
"dev": "yarn run build && yarn run prepare:electron-native && node lib/bin.js",
+25 -21
View File
@@ -930,25 +930,29 @@ describe('published package surface', () => {
expect(manifest.scripts?.['dist:mac-smoke']).toBe('node scripts/package-mac.ts')
expect(manifest.scripts?.['dist:win']).toBe('node scripts/package-win.ts')
expect(manifest.scripts?.['dist:win-portable']).toBe('node scripts/package-win-portable.ts')
expect(manifest.scripts?.['check:win-package']).toContain('yarn workspace dsh-community-market build')
expect(manifest.scripts?.['check:win-package']).toContain('yarn run build')
expect(manifest.scripts?.['check:win-package']).toContain('yarn run typecheck')
expect(manifest.scripts?.['check:win-package']).toContain('tests/package-win.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/desktop-installer-quit.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/installer-nsh.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/verify-win-portable.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/update-checker.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/update-download.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/windows-volume-diagnostics.spec.ts')
expect(manifest.scripts?.['check:win-package']).not.toContain('verify:win-minimal-pty')
expect(manifest.scripts?.['check:win-package']).toContain('yarn run verify:closure')
expect(manifest.scripts?.['check:mac-package']).toContain('yarn workspace dsh-community-market build')
expect(manifest.scripts?.['check:mac-package']).toContain('yarn run build')
expect(manifest.scripts?.['check:mac-package']).toContain('yarn run typecheck')
expect(manifest.scripts?.['check:mac-package']).toContain('tests/package-mac.spec.ts')
expect(manifest.scripts?.['check:mac-package']).toContain('tests/verify-mac-smoke.spec.ts')
expect(manifest.scripts?.['check:mac-package']).toContain('tests/mac-universal.spec.ts')
expect(manifest.scripts?.['check:mac-package']).toContain('yarn run verify:closure')
expect(manifest.scripts?.['check:win-package:platform']).toContain('yarn workspace dsh-community-market build')
expect(manifest.scripts?.['check:win-package:platform']).toContain('yarn run build')
expect(manifest.scripts?.['check:win-package']).toBe('yarn run check:win-package:platform && yarn run typecheck')
expect(manifest.scripts?.['check:win-package:platform']).not.toContain('typecheck')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/package-win.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/desktop-installer-quit.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/installer-nsh.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/verify-win-portable.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/update-checker.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/update-download.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/windows-volume-diagnostics.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).not.toContain('verify:win-minimal-pty')
expect(manifest.scripts?.['check:win-package:platform']).toContain('yarn run verify:closure')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('yarn workspace dsh-community-market build')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('yarn run build')
expect(manifest.scripts?.['check:mac-package']).toBe('yarn run check:mac-package:platform && yarn run typecheck')
expect(manifest.scripts?.['check:mac-package:platform']).not.toContain('typecheck')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('tests/package-mac.spec.ts')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('tests/verify-mac-smoke.spec.ts')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('tests/mac-universal.spec.ts')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('yarn run verify:closure')
expect(manifest.scripts?.['check:linux-package']).toBe('yarn run check:linux-package:platform && yarn run typecheck')
expect(manifest.scripts?.['check:linux-package:platform']).not.toContain('typecheck')
expect(manifest.scripts?.['verify:cli']).toBe('node scripts/verify-cli-runtime.mjs')
expect(manifest.scripts?.check).toContain('yarn run verify:cli')
expect(workspaceManifest.scripts?.['dist:mac:beta'])
@@ -999,13 +1003,13 @@ describe('published package surface', () => {
expect(windowsJob).not.toContain('- run: yarn check')
expect(windowsJob).toContain('workspace: [dsh-plugin-desktop, dsh-plugin-desktop-beta]')
expect(windowsJob).toContain('- run: yarn workspace ${{ matrix.workspace }} check:win-package')
expect(windowsJob).toContain('- run: yarn workspace ${{ matrix.workspace }} check:win-package:platform')
expect(windowsJob).toContain('run: yarn workspace ${{ matrix.workspace }} dist:win')
expect(windowsJob).toContain('run: yarn workspace ${{ matrix.workspace }} dist:win-portable')
expect(windowsJob).toContain('DSH_PACKAGE_CHECK_ALREADY_RAN: \'1\'')
expect(macosJob).not.toContain('- run: yarn check')
expect(macosJob).toContain('workspace: [dsh-plugin-desktop, dsh-plugin-desktop-beta]')
expect(macosJob).toContain('- run: yarn workspace ${{ matrix.workspace }} check:mac-package')
expect(macosJob).toContain('- run: yarn workspace ${{ matrix.workspace }} check:mac-package:platform')
expect(macosJob).toContain('run: yarn workspace ${{ matrix.workspace }} dist:mac-smoke')
expect(macosJob).toContain('DSH_PACKAGE_CHECK_ALREADY_RAN: \'1\'')
expect(macosJob).not.toContain('- run: yarn dist:mac-smoke')
+6 -3
View File
@@ -127,9 +127,12 @@
"verify:operations": "node --test scripts/operation-reliability.spec.mjs && node scripts/verify-operation-reliability.mjs",
"verify:notices": "node scripts/verify-licenses.mjs --notices THIRD_PARTY_NOTICES.md",
"check": "yarn run build && yarn run typecheck && yarn run test && yarn run verify:closure && yarn run verify:cli && yarn run verify:loader && yarn run verify:profile && yarn run verify:aa && yarn run verify:licenses && yarn run verify:operations",
"check:win-package": "yarn workspace dsh-community-market build && yarn run build && yarn run typecheck && vitest run tests/package.spec.ts tests/package-win.spec.ts tests/desktop-installer-quit.spec.ts tests/installer-nsh.spec.ts tests/update-checker.spec.ts tests/update-download.spec.ts tests/verify-win-installer.spec.ts tests/verify-win-portable.spec.ts tests/verify-packaged-runtime.spec.ts tests/windows-pwsh-sandbox.spec.ts tests/windows-volume-diagnostics.spec.ts tests/window-options.spec.ts tests/safe-mode.spec.ts && yarn run verify:closure",
"check:mac-package": "yarn workspace dsh-community-market build && yarn run build && yarn run typecheck && vitest run tests/package.spec.ts tests/package-mac.spec.ts tests/verify-mac-smoke.spec.ts tests/verify-packaged-runtime.spec.ts tests/mac-universal.spec.ts && yarn run verify:closure",
"check:linux-package": "yarn workspace dsh-community-market build && yarn run build && yarn run typecheck && vitest run tests/package.spec.ts tests/package-linux.spec.ts tests/verify-linux-artifacts.spec.ts tests/verify-packaged-runtime.spec.ts && yarn run verify:closure",
"check:win-package": "yarn run check:win-package:platform && yarn run typecheck",
"check:win-package:platform": "yarn workspace dsh-community-market build && yarn run build && vitest run tests/package.spec.ts tests/package-win.spec.ts tests/desktop-installer-quit.spec.ts tests/installer-nsh.spec.ts tests/update-checker.spec.ts tests/update-download.spec.ts tests/verify-win-installer.spec.ts tests/verify-win-portable.spec.ts tests/verify-packaged-runtime.spec.ts tests/windows-pwsh-sandbox.spec.ts tests/windows-volume-diagnostics.spec.ts tests/window-options.spec.ts tests/safe-mode.spec.ts && yarn run verify:closure",
"check:mac-package": "yarn run check:mac-package:platform && yarn run typecheck",
"check:mac-package:platform": "yarn workspace dsh-community-market build && yarn run build && vitest run tests/package.spec.ts tests/package-mac.spec.ts tests/verify-mac-smoke.spec.ts tests/verify-packaged-runtime.spec.ts tests/mac-universal.spec.ts && yarn run verify:closure",
"check:linux-package": "yarn run check:linux-package:platform && yarn run typecheck",
"check:linux-package:platform": "yarn workspace dsh-community-market build && yarn run build && vitest run tests/package.spec.ts tests/package-linux.spec.ts tests/verify-linux-artifacts.spec.ts tests/verify-packaged-runtime.spec.ts && yarn run verify:closure",
"start": "node lib/bin.js",
"dev": "yarn run build && yarn run prepare:electron-native && node lib/bin.js",
"package:dir": "yarn run build && yarn run prepare:electron-native && node scripts/package-dir.mjs",
+25 -21
View File
@@ -870,25 +870,29 @@ describe('published package surface', () => {
expect(manifest.scripts?.['dist:mac-smoke']).toBe('node scripts/package-mac.ts')
expect(manifest.scripts?.['dist:win']).toBe('node scripts/package-win.ts')
expect(manifest.scripts?.['dist:win-portable']).toBe('node scripts/package-win-portable.ts')
expect(manifest.scripts?.['check:win-package']).toContain('yarn workspace dsh-community-market build')
expect(manifest.scripts?.['check:win-package']).toContain('yarn run build')
expect(manifest.scripts?.['check:win-package']).toContain('yarn run typecheck')
expect(manifest.scripts?.['check:win-package']).toContain('tests/package-win.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/desktop-installer-quit.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/installer-nsh.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/verify-win-portable.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/update-checker.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/update-download.spec.ts')
expect(manifest.scripts?.['check:win-package']).toContain('tests/windows-volume-diagnostics.spec.ts')
expect(manifest.scripts?.['check:win-package']).not.toContain('verify:win-minimal-pty')
expect(manifest.scripts?.['check:win-package']).toContain('yarn run verify:closure')
expect(manifest.scripts?.['check:mac-package']).toContain('yarn workspace dsh-community-market build')
expect(manifest.scripts?.['check:mac-package']).toContain('yarn run build')
expect(manifest.scripts?.['check:mac-package']).toContain('yarn run typecheck')
expect(manifest.scripts?.['check:mac-package']).toContain('tests/package-mac.spec.ts')
expect(manifest.scripts?.['check:mac-package']).toContain('tests/verify-mac-smoke.spec.ts')
expect(manifest.scripts?.['check:mac-package']).toContain('tests/mac-universal.spec.ts')
expect(manifest.scripts?.['check:mac-package']).toContain('yarn run verify:closure')
expect(manifest.scripts?.['check:win-package:platform']).toContain('yarn workspace dsh-community-market build')
expect(manifest.scripts?.['check:win-package:platform']).toContain('yarn run build')
expect(manifest.scripts?.['check:win-package']).toBe('yarn run check:win-package:platform && yarn run typecheck')
expect(manifest.scripts?.['check:win-package:platform']).not.toContain('typecheck')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/package-win.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/desktop-installer-quit.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/installer-nsh.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/verify-win-portable.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/update-checker.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/update-download.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).toContain('tests/windows-volume-diagnostics.spec.ts')
expect(manifest.scripts?.['check:win-package:platform']).not.toContain('verify:win-minimal-pty')
expect(manifest.scripts?.['check:win-package:platform']).toContain('yarn run verify:closure')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('yarn workspace dsh-community-market build')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('yarn run build')
expect(manifest.scripts?.['check:mac-package']).toBe('yarn run check:mac-package:platform && yarn run typecheck')
expect(manifest.scripts?.['check:mac-package:platform']).not.toContain('typecheck')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('tests/package-mac.spec.ts')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('tests/verify-mac-smoke.spec.ts')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('tests/mac-universal.spec.ts')
expect(manifest.scripts?.['check:mac-package:platform']).toContain('yarn run verify:closure')
expect(manifest.scripts?.['check:linux-package']).toBe('yarn run check:linux-package:platform && yarn run typecheck')
expect(manifest.scripts?.['check:linux-package:platform']).not.toContain('typecheck')
expect(manifest.scripts?.['verify:cli']).toBe('node scripts/verify-cli-runtime.mjs')
expect(manifest.scripts?.check).toContain('yarn run verify:cli')
expect(workspaceManifest.scripts?.['dist:mac'])
@@ -931,13 +935,13 @@ describe('published package surface', () => {
expect(windowsJob).not.toContain('- run: yarn check')
expect(windowsJob).toContain('workspace: [dsh-plugin-desktop, dsh-plugin-desktop-beta]')
expect(windowsJob).toContain('- run: yarn workspace ${{ matrix.workspace }} check:win-package')
expect(windowsJob).toContain('- run: yarn workspace ${{ matrix.workspace }} check:win-package:platform')
expect(windowsJob).toContain('run: yarn workspace ${{ matrix.workspace }} dist:win')
expect(windowsJob).toContain('run: yarn workspace ${{ matrix.workspace }} dist:win-portable')
expect(windowsJob).toContain('DSH_PACKAGE_CHECK_ALREADY_RAN: \'1\'')
expect(macosJob).not.toContain('- run: yarn check')
expect(macosJob).toContain('workspace: [dsh-plugin-desktop, dsh-plugin-desktop-beta]')
expect(macosJob).toContain('- run: yarn workspace ${{ matrix.workspace }} check:mac-package')
expect(macosJob).toContain('- run: yarn workspace ${{ matrix.workspace }} check:mac-package:platform')
expect(macosJob).toContain('run: yarn workspace ${{ matrix.workspace }} dist:mac-smoke')
expect(macosJob).toContain('DSH_PACKAGE_CHECK_ALREADY_RAN: \'1\'')
expect(macosJob).not.toContain('- run: yarn dist:mac-smoke')