Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

fix(ci): keep Motion policy checks portable and reuse hosted Chrome

罗高94d15d656eb0
diff --git a/.github/workflows/motion-candidate.yml b/.github/workflows/motion-candidate.yml
index bfdd406d..02a7fc0c 100644
--- a/.github/workflows/motion-candidate.yml
+++ b/.github/workflows/motion-candidate.yml
@@ -27,7 +27,7 @@ jobs:
MOTION_SOURCE_SHA: ${{ inputs.source_sha }}
MOTION_VERSION: ${{ inputs.version }}
OPENMOTION_TELEMETRY: '0'
- HYPERFRAMES_BROWSER_PATH: /usr/bin/chromium
+ HYPERFRAMES_BROWSER_PATH: /usr/bin/google-chrome
HYPERFRAMES_FFMPEG_PATH: /usr/bin/ffmpeg
HYPERFRAMES_FFPROBE_PATH: /usr/bin/ffprobe
steps:
@@ -55,7 +55,11 @@ jobs:
node control/.github/scripts/motion-scan.mjs install "$RUNNER_TEMP/scanner"
node control/.github/scripts/motion-scan.mjs source source "$RUNNER_TEMP/source-scan.json" "$RUNNER_TEMP/scanner/gitleaks"
- name: Install rendering test tools
- run: sudo apt-get update -qq && sudo apt-get install -y -qq --no-install-recommends zip unzip chromium ffmpeg fonts-noto-core
+ run: |
+ # The hosted Ubuntu image provides Chrome; avoid Ubuntu's desktop Chromium snap.
+ "$HYPERFRAMES_BROWSER_PATH" --version
+ sudo apt-get update -qq
+ sudo apt-get install -y -qq --no-install-recommends zip unzip ffmpeg fonts-noto-core
- name: Check the selected source
working-directory: source
run: |
diff --git a/tests/npm-package.test.ts b/tests/npm-package.test.ts
index adfc1cd4..b79d2814 100644
--- a/tests/npm-package.test.ts
+++ b/tests/npm-package.test.ts
@@ -11,6 +11,16 @@ import { mcpRegistry } from '../mcp.ts';
const json = async (file: string) => JSON.parse(await readFile(file, 'utf8'));
+test('shared Agent instructions keep the release controls synchronized', async () => {
+ const section = async file => {
+ const text = await readFile(new URL(`../${file}`, import.meta.url), 'utf8');
+ return text.split('## Candidate and publication controls\n')[1].split('\n## ')[0].trim();
+ };
+ const shared = await section('AGENTS.md');
+ assert(shared.includes('DEV template defaults') && shared.includes('Publish under `candidate` first') && shared.includes('after both matching DEV native reports pass'));
+ assert.equal(await section('CLAUDE.md'), shared, 'CLAUDE.md must mirror the AGENTS.md release controls');
+});
+
test('release packaging rejects floating npm versions, lock drift, unpinned native assets and a mismatched browser', async () => {
const pkg = await json('package.json'), lock = await json('package-lock.json'), runtime = await json('scripts/runtime-lock.json');
checkReleaseLocks(pkg, lock, runtime);
diff --git a/tests/release-workflows.test.mjs b/tests/release-workflows.test.mjs
index 85f7ba79..c20a86f1 100644
--- a/tests/release-workflows.test.mjs
+++ b/tests/release-workflows.test.mjs
@@ -211,16 +211,6 @@ test('partial publication retries use the retained producer artifact IDs across
}
});
-test('shared Agent instructions keep the release controls synchronized', async () => {
- const section = async file => {
- const text = await readFile(new URL(`../${file}`, import.meta.url), 'utf8');
- return text.split('## Candidate and publication controls\n')[1].split('\n## ')[0].trim();
- };
- const shared = await section('AGENTS.md');
- assert(shared.includes('DEV template defaults') && shared.includes('Publish under `candidate` first') && shared.includes('after both matching DEV native reports pass'));
- assert.equal(await section('CLAUDE.md'), shared, 'CLAUDE.md must mirror the AGENTS.md release controls');
-});
-
test('daily build and publication are separate manual entries without an independent environment gate', async () => {
const build = await readFile(new URL('../.github/workflows/motion-candidate.yml', import.meta.url), 'utf8');
const workflow = await readFile(new URL('../.github/workflows/motion-publish-test.yml', import.meta.url), 'utf8');
@@ -229,6 +219,8 @@ test('daily build and publication are separate manual entries without an indepen
assert(build.includes('workflow_dispatch:') && build.includes('version:') && build.includes('source_sha:'));
assert(build.includes('name: ' + candidateJobName) && build.includes('ref: ${{ steps.source.outputs.source_sha }}'));
assert(build.includes('--template-env=dev') && !build.includes('--template-env=prod'));
+ assert(build.includes('HYPERFRAMES_BROWSER_PATH: /usr/bin/google-chrome') && build.includes('\"$HYPERFRAMES_BROWSER_PATH\" --version'));
+ assert(!/apt-get install[^\n]*\bchromium\b/.test(build), 'Candidate builds must not install Ubuntu desktop snaps');
assert(build.includes('name: motion-candidate-${{ inputs.version }}') && build.includes('candidate-install.md'));
assert(!build.includes('concurrency:') && !build.includes('secrets.') && !build.includes('id-token:'));
assert(header.includes('version:') && header.includes('accepted:') && header.includes('default: false'));