Skip to content

Commit f2dde59

Browse files
author
dazhi
committed
Revert "ci: run a plugin's own tests when a pull request changes it (#84)"
This reverts commit 475a658. The workflow runs each plugin's npm test on a clean macOS runner with Node.js 22 and Git only. The trial (#88) showed plugin tests depend on what is installed: cutline needs FFmpeg, which the runner lacks, and a CI-provided toolset would need its own install, pinning, and maintenance. Plugin authors keep their tests passing on their own machines instead, as CONTRIBUTING already asks them to test the app and report the environment in the pull request. Removes .github/workflows/plugin-tests.yml and the "Plugin tests" sections in CONTRIBUTING (en/zh) and AGENTS.md step 5. Assisted-by: Claude Opus 5.5 (OpenCode)
1 parent 475a658 commit f2dde59

4 files changed

Lines changed: 1 addition & 113 deletions

File tree

‎.github/workflows/plugin-tests.yml‎

Lines changed: 0 additions & 88 deletions
This file was deleted.

‎AGENTS.md‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,7 @@ package at `plugins/<github-username>/<plugin-id>/`; the rest change the checks
2424
(`docs/package-contract.md`), name a MiniMax Code version at or above it under
2525
`## Tested environment`.
2626
4. Add one row to the table in both root READMEs.
27-
5. Tests are optional. Put them in the package directory (for example `tests/`) and run them
28-
through `scripts.test` in the package's `package.json`; the Plugin tests workflow runs `npm test`
29-
there, on macOS with Node.js 22 and Git only, when a pull request changes the package. Skip a test
30-
when a tool it needs, such as FFmpeg, is missing. Keep them off external hosts (loopback is fine),
31-
install dependencies only inside the package with a committed `package-lock.json`, and delete
32-
that `node_modules` before the next step.
33-
6. Run `npm run check`. Done when it reports no errors and every warning is either fixed or
27+
5. Run `npm run check`. Done when it reports no errors and every warning is either fixed or
3428
explained in the PR description.
3529

3630
## Hard rules

‎CONTRIBUTING.md‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,4 @@ Submit ready-to-run files. If the app requires a build step, include its source
1616

1717
Before submitting, install the app in MiniMax Code, open it, and check its main features. Include your test environment and results in the pull request, and state any unverified behavior. When updating an existing app, keep its plugin ID and update the version and usage instructions as appropriate.
1818

19-
## Plugin tests
20-
21-
Tests for a plugin are optional and live inside the plugin's own directory (for example `plugins/<author>/<plugin-id>/tests/`). They run through the `test` script in the plugin's `package.json`, i.e. `npm test` from the plugin directory.
22-
23-
- Tests must not reach external network hosts and must not depend on the MiniMax Code host app. A server the test starts on `127.0.0.1` is fine.
24-
- Install any dependencies only inside the plugin directory (commit a `package-lock.json` if you have dependencies); never add them to the root `package.json`. Delete the plugin's `node_modules` before running `npm run check`: the check rejects any `node_modules` directory inside a package, ignored by Git or not.
25-
- The root `test/` directory is reserved for repository-wide Mini App rule checks. It must not import or run plugin tests.
26-
- The `Plugin tests` workflow runs only for plugins changed by a pull request, separately from the rules CI (`npm run check`). It runs on macOS with Node.js 22 and Git and nothing else: a test that needs another tool, such as FFmpeg or a browser, must skip itself when the tool is missing.
27-
2819
Working with an AI coding agent? It reads `AGENTS.md` automatically; `docs/` holds the same rules for people.

‎CONTRIBUTING.zh-CN.md‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,4 @@
1616

1717
提交前在 MiniMax Code 中手动安装、打开并检查主要功能,在 PR 中写明测试环境和结果;未验证的部分如实说明。更新已有作品时,保留插件 ID,并按改动更新版本与使用说明。
1818

19-
## 插件测试
20-
21-
插件测试是可选的,放在插件自己的目录里(例如 `plugins/<author>/<plugin-id>/tests/`),通过插件 `package.json` 中的 `test` 脚本运行,即在插件目录下执行 `npm test`。
22-
23-
- 测试不得访问外部网络,也不得依赖 MiniMax Code 宿主应用;测试自己在 `127.0.0.1` 上启动的服务不受限制。
24-
- 依赖只安装在插件目录内(有依赖时请提交 `package-lock.json`),不要加到根目录 `package.json`。运行 `npm run check` 前请删除插件目录里的 `node_modules`:无论是否被 Git 忽略,规则检查都会拒绝包内的 `node_modules` 目录。
25-
- 根目录 `test/` 只用于仓库级的 MiniApp 规则检查,不得引用或运行插件测试。
26-
- `Plugin tests` 工作流只针对 PR 改动到的插件运行,与规则 CI(`npm run check`)相互独立。CI 运行在 macOS 上,只提供 Node.js 22 和 Git:需要其他工具(如 FFmpeg 或浏览器)的测试,在工具缺失时必须自行跳过。
27-
2819
使用 AI 编码助手时,它会自动读取 `AGENTS.md`;`docs/` 里是同一套规则的人类可读版本。

0 commit comments

Comments
 (0)