forked from scratchfoundation/scratch-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add root-level scripts for monorepo CI/CD integration #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
- Add build:vm, build:gui scripts - Add lint:gui, lint:vm scripts - Add test:unit:gui, test:unit:vm scripts - Add test:integration:gui, test:integration:vm scripts - Update build, lint, test, test:unit, test:integration to use these scripts These scripts ensure correct build order and allow CI to target specific workspaces easily. 🤖 Generated with [Gemini Code](https://gemini.google.com/code) Co-Authored-By: Gemini <noreply@google.com>
5 tasks
- Add globalIgnores for generated files (static, test, src/examples, coverage) - Add max-len rule exception for locale files (src/locales/*.js) - Fix react/jsx-max-props-per-line error in preference-menu.jsx - Fix quotes errors in en.js (double to single quotes) - Fix eol-last error in index.ts Related to Phase 1 of #40 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add new ci-cd.yml workflow for monorepo (build, lint, unit tests) - Remove old ci.yml (merged into ci-cd.yml) - Remove publish.yml (will restore when needed) - Remove update-i18n.yml (will restore when needed) - Remove signature-assistant.yml (will restore when needed) - Remove ghpages-cleanup.yml (will restore when needed) - Keep commitlint.yml and gha-debug.yml as-is Implements Phase 1 of #40 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This reverts commit 6e9c14c.
- Add build:vm script to build dependencies in correct order: task-herder → scratch-svg-renderer → scratch-render → scratch-vm - Add build:gui script to build scratch-gui separately - Add lint scripts (lint:gui, lint:vm) - Add test scripts (test:unit, test:integration for both gui and vm) This ensures scratch-vm can find scratch-render's built files during webpack config loading. Fixes CI build failure in Phase 1 of #40 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Restore upstream-compatible build script (NODE_ENV=production) - Add build:dev script for lint/test workflows (development mode) - Add build:dev to all workspace packages (task-herder, scratch-svg-renderer, scratch-render, scratch-vm) - Update CI/CD workflow to use build:dev - Use --workspaces flag (executes in package.json order) This maintains upstream compatibility while providing separate development builds for CI. Implements Phase 1 of #40 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add 'test' state to mocked Redux store in unit test. - Use optional chaining when accessing 'state.scratchGui.test' in SBFileUploaderHOC. Co-Authored-By: Gemini <noreply@google.com>
5ed55af to
358f85e
Compare
- Add lint, test:unit, test:integration to each package.json - Update root package.json to use npm run --workspaces for these scripts - Ensure CI/CD uses standardized commands 🤖 Generated with [Gemini Code](https://gemini.google.com/code) Co-Authored-By: Gemini <noreply@google.com>
- Update package.json files for scratch-gui, scratch-render, scratch-vm, scratch-svg-renderer, and task-herder. - Set unique JEST_JUNIT_OUTPUT_NAME or reporter-file names for each package. - Ensure test results can be collected as separate artifacts in GitHub Actions. 🤖 Generated with [Gemini Code](https://gemini.google.com/code) Co-Authored-By: Gemini <noreply@google.com>
- Revert package-specific JUnit output filenames to generic names (e.g., unit-tests-results.xml). - Since npm run --workspaces stores results in separate directories per package, unique filenames are redundant. - Affects scratch-gui, scratch-render, scratch-vm, scratch-svg-renderer, and task-herder. 🤖 Generated with [Gemini Code](https://gemini.google.com/code) Co-Authored-By: Gemini <noreply@google.com>
- Remove VITEST_JUNIT_OUTPUT_FILE from task-herder/package.json test:unit script. - The output is already correctly handled and the variable was being ignored. 🤖 Generated with [Gemini Code](https://gemini.google.com/code) Co-Authored-By: Gemini <noreply@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds root-level scripts to the monorepo package.json to facilitate CI/CD integration and ensure correct build order between workspaces.
Changes
build:vm,build:guiscriptslint:gui,lint:vmscriptstest:unit:gui,test:unit:vmscriptstest:integration:gui,test:integration:vmscriptsbuild,lint,test,test:unit,test:integrationto use these scriptsThese changes are required for Phase 6 of the monorepo migration (smalruby/smalruby3-develop#40).
🤖 Generated with Gemini Code