fix: harden mac release architecture verification

This commit is contained in:
Cita
2026-03-19 20:49:22 +08:00
parent 6c3a09da86
commit 1607928b6c
+16 -16
View File
@@ -1,16 +1,16 @@
import { describe, expect, it } from 'vitest'; import { describe, expect, it } from 'vitest';
import { readFileSync } from 'node:fs'; import { readFileSync } from 'node:fs';
import { resolve } from 'node:path'; import { resolve } from 'node:path';
describe('release workflow', () => { describe('release workflow', () => {
it('builds macOS arm64 and x64 on dedicated runners and verifies packaged app architecture', () => { it('builds macOS arm64 and x64 on dedicated runners and verifies packaged app architecture', () => {
const workflow = readFileSync(resolve(process.cwd(), '.github/workflows/release.yml'), 'utf8'); const workflow = readFileSync(resolve(process.cwd(), '.github/workflows/release.yml'), 'utf8');
expect(workflow).toContain('runner: macos-15-intel'); expect(workflow).toContain('runner: macos-15-intel');
expect(workflow).toContain('runner: macos-15'); expect(workflow).toContain('runner: macos-15');
expect(workflow).toContain('expectedMacArch: x64'); expect(workflow).toContain('expectedMacArch: x64');
expect(workflow).toContain('expectedMacArch: arm64'); expect(workflow).toContain('expectedMacArch: arm64');
expect(workflow).toContain('Verify packaged macOS architecture'); expect(workflow).toContain('Verify packaged macOS architecture');
expect(workflow).toContain('lipo -archs'); expect(workflow).toContain('node scripts/desktop/verifyMacArchitecture.mjs');
}); });
}); });