Repository navigation
ci: Add support for run plugin tests in BBB's CI - #23028
Conversation
WalkthroughThe changes update the Sequence Diagram(s)sequenceDiagram
participant Developer
participant NPM
participant Postinstall Script
participant PluginSDK
Developer->>NPM: Run npm install
NPM->>PluginSDK: Download from GitHub tarball URL
NPM->>NPM: Install dependencies
NPM->>Postinstall Script: Trigger postinstall
Postinstall Script->>NPM: Check package.json for URL dependency
alt If dependency is a URL
Postinstall Script->>PluginSDK: cd to package directory
Postinstall Script->>PluginSDK: Run npm ci
Postinstall Script->>PluginSDK: Run npm run build
Postinstall Script->>PluginSDK: Remove node_modules
end
Postinstall Script->>NPM: Complete postinstall (ignore errors)
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
bigbluebutton-html5/package.json (3)
6-6: Refactor and modularize the postinstall script for maintainability
The one-liner atscripts.postinstallis hard to read, test, and extend. Consider extracting this logic into a dedicated script (e.g.scripts/postinstall-plugin-sdk.shor a Node script) and then invoking it:- "postinstall": "grep -q '\"bigbluebutton-html-plugin-sdk\" *: *\"https://codeload' package.json && echo executing postInstall... && cd node_modules/bigbluebutton-html-plugin-sdk 2>/dev/null && npm ci && npm run build && rm -rf node_modules || true", + "postinstall": "sh scripts/postinstall-plugin-sdk.sh"This lets you add robust error handling, clear logging, and easier cross-platform support.
60-60: Consider using a git+https dependency for clarity
Many workflows supportgit+httpsreferences more predictably than codeload tarballs. You could rewrite the dependency as:-"bigbluebutton-html-plugin-sdk": "https://codeload.github.com/bigbluebutton/bigbluebutton-html-plugin-sdk/tar.gz/2239fd4159f0853ed9405de3b8a00818ff36ec86", +"bigbluebutton-html-plugin-sdk": "git+https://github.com/bigbluebutton/bigbluebutton-html-plugin-sdk.git#2239fd4159f0853ed9405de3b8a00818ff36ec86",This approach is easier to pin and can improve cache hits in CI.
5-14: Add dedicated scripts for plugin SDK build & test
To streamline CI and local workflows, you might expose separate npm scripts:"scripts": { "build:plugin-sdk": "sh scripts/postinstall-plugin-sdk.sh", "test:plugin-sdk": "cd node_modules/bigbluebutton-html-plugin-sdk && npm test", "postinstall": "npm run build:plugin-sdk" }Then CI can explicitly run
npm run test:plugin-sdkafternpm ci, making the intent clearer and failures easier to diagnose.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
bigbluebutton-html5/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
bigbluebutton-html5/package.json(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: build-package (others)
- GitHub Check: build-package (bbb-html5)
- GitHub Check: build-package (bbb-graphql-server)
- GitHub Check: build-package (bbb-playback-record)
- GitHub Check: ts-code-compilation
- GitHub Check: ts-code-validation
🔇 Additional comments (1)
bigbluebutton-html5/package.json (1)
60-60:Details
❓ Verification inconclusive
Validate tarball URL installation across package managers
Referencing a raw tarball can behave differently under npm, Yarn, and pnpm, and can break CI caching. Please verify that the URL is reachable in your CI environment and that the SDK installs correctly:Ensure all pipelines still pass with this change.
🏁 Script executed:
npm install npm ls bigbluebutton-html-plugin-sdk yarn install --frozen-lockfile pnpm installLength of output: 1100
Please verify tarball URL installation in each package manager
It looks like the install commands were run from the repo root (no package.json found). To confirm the SDK URL works across npm, Yarn, and pnpm, cd intobigbluebutton-html5/and run:cd bigbluebutton-html5 npm install npm ls bigbluebutton-html-plugin-sdk yarn install --frozen-lockfile pnpm installEnsure the tarball URL is reachable, the SDK installs correctly, and all CI pipelines pass.
|
This pull request has conflicts ☹ |
|
Automated tests Summary✅ All the CI tests have passed! |



What does this PR do?
Add support for run plugin tests in BBB's CI. This basically fix the typescript issues that arise from importing a commit and building it all inside the CI.
Motivation
Add CI tests for plugins in BBB's repo
More
Closely related to bigbluebutton/bigbluebutton-html-plugin-sdk#176
Needs to be updated once a new SDK version is published