Add Plugin: html2video-for-mcode #53
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # html2video-for-mcode · scoped smoke CI | |
| # 官方主 CI(ci.yml)只跑 validate + node --test(无 ffmpeg/playwright, 渲染冒烟会 skip)。 | |
| # 本 workflow 按 CONTRIBUTING/ci.yml 注释给出的"单插件 scoped workflow"模式, | |
| # 装齐依赖后真实执行全部测试 —— 这是 PR #41 评审要求的可执行测试证据。 | |
| # 触发条件: 仅本插件目录(.github/workflows/ 本文件除外)或本文件自身变更。 | |
| # | |
| # 第三轮 review 修正(2026-09-18, 1.7.1 才真正推上来 —— 1.7.0 时这份修正只改了本地没推送, | |
| # PR 分支上一直是旧枚举版, 漏跑 cover-transition / review-round2 / review-round3 / subtitles-invalidate): | |
| # ① 测试文件不再逐个枚举, 改用 shell glob `tests/*.test.mjs` —— 枚举写法每加一个测试文件就要 | |
| # 手工记得改这里, 历史上已经漏过 css-kit / tokens-fx / chart-kit / table-kit 与上述四个文件。 | |
| # ② 补 permissions: contents: read(与本仓库其余 scoped workflow 一致, 只读仓库)。 | |
| # ③ actions 按仓库主 ci.yml 的同一批版本做**完整 SHA pin**(附版本注释), 不用浮动 tag; | |
| # SHA 由 gh api repos/<owner>/<repo>/commits/<tag> 解析得到, 40 位整(主 ci.yml 的 checkout | |
| # 那行多了一位字符, 那是宿主仓库自己的笔误, 不去动它 —— 见 PR comment)。 | |
| # | |
| # 第四轮 CHANGES_REQUESTED 修正(2026-09-21): 评审要求 exact-head 证据覆盖 **Windows** —— | |
| # 新增 windows-latest 作业(同一条命令, 依赖换成 choco ffmpeg + chromium)。两个作业的命令与 | |
| # 依赖组合已先在技能镜像仓的 CI 上双平台跑绿(248 pass / 0 fail / 0 skip, 两个平台各一次), | |
| # Node 版本也从 22 提到 24 与那份证过的配置对齐(此 workflow 此前因审批门从未真正执行过)。 | |
| # ffmpeg 一律走系统包(PATH 发现): 测试会把脚本放进临时项目目录当 cwd 跑, node_modules 发现 | |
| # 依赖 cwd/上两层锚点, 在插件这种深层布局里够不到仓库根的 node_modules。 | |
| name: html2video-for-mcode smoke | |
| on: | |
| pull_request: | |
| paths: | |
| - 'plugins/Wzdhehe/html2video-for-mcode/**' | |
| - '.github/workflows/html2video-for-mcode-smoke.yml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'plugins/Wzdhehe/html2video-for-mcode/**' | |
| - '.github/workflows/html2video-for-mcode-smoke.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| smoke-linux: | |
| name: smoke (ubuntu-latest · ffmpeg + chromium) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Node | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 24 | |
| - name: Install ffmpeg | |
| run: sudo apt-get update && sudo apt-get install -y --no-install-recommends ffmpeg | |
| - name: Install playwright (no package.json / lockfile changes) | |
| run: | | |
| npm install --no-save --no-package-lock playwright | |
| npx playwright install --with-deps chromium | |
| # 一条命令跑完 tests/ 下的**全部** *.test.mjs(安全 / 策略 / 模板 / 受管块 / 渲染冒烟)。 | |
| # glob 交给 shell 展开: 以后新增测试文件自动进 CI, 不需要改这里(旧枚举写法漏过 8 个文件)。 | |
| # 单测超时 300s: 渲染冒烟里的 capture / build-video 在 CI 上要几十秒。 | |
| - name: All tests (security · policy · templates · css blocks · render smoke) | |
| run: | | |
| node --test --test-timeout=300000 \ | |
| plugins/Wzdhehe/html2video-for-mcode/skills/html2video-for-mcode/tests/*.test.mjs | |
| smoke-windows: | |
| name: smoke (windows-latest · ffmpeg + chromium) | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Node | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 24 | |
| # choco 的 ffmpeg 包含 ffmpeg.exe 与 ffprobe.exe, 落在 PATH 上 | |
| - name: Install ffmpeg | |
| shell: bash | |
| run: choco install ffmpeg -y --no-progress | |
| - name: Install playwright (no package.json / lockfile changes) | |
| shell: bash | |
| run: | | |
| npm install --no-save --no-package-lock playwright | |
| npx playwright install chromium | |
| - name: All tests (security · policy · templates · css blocks · render smoke) | |
| shell: bash | |
| run: | | |
| node --test --test-timeout=300000 \ | |
| plugins/Wzdhehe/html2video-for-mcode/skills/html2video-for-mcode/tests/*.test.mjs |