-
Notifications
You must be signed in to change notification settings - Fork 9
ci: optimize frontend github actions #185
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
Conversation
WalkthroughThe pull request modifies the GitHub Actions workflow for frontend testing by introducing caching mechanisms for npm and apt packages. The changes optimize the CI process by caching dependencies using Changes
Possibly related PRs
Suggested reviewers
Poem
Warning Review ran into problems🔥 ProblemsGitHub Actions: Resource not accessible by integration - https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository. Please grant the required permissions to the CodeRabbit GitHub App under the organization or repository settings. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/test_frontend.yaml (1)
Line range hint
47-75: Track disabled test configurationsMultiple disabled test sections should be tracked in issues.
Want me to create GitHub issues to track these TODOs?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
.github/workflows/test_frontend.yaml(1 hunks)
🔇 Additional comments (1)
.github/workflows/test_frontend.yaml (1)
35-36: LGTM: Proper npm caching configuration
sean-zlai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ken-zlai, this is great!
I compared before/after PR runs and noticed the Setup Node step took a few extra seconds (1s => 3s), but could just be a simple run to run difference (and quite a tiny change regardless).
| Before | After |
|---|---|
![]() |
![]() |
The apt-get step did drop a good bit as expected (12s => 3s). This is a nice action / abstraction from using actions/cache directly.
If we ever need to do something more complex to setup the environment, we could look at a custom Docker container approach (similar to the python workflow)
Yeah, I've noticed that most of the steps have an inconsistent runtime. I've seen the optimized node runtime at 1s and also 3s like you mentioned :) |
## Summary Added caching for Node modules and Thrift compiler in the frontend CI workflow to improve build times and reduce resource usage. Using [actions/setup-node](https://github.com/actions/setup-node#caching-global-packages-data) for npm dependencies and [awalsh128/cache-apt-pkgs-action](https://github.com/awalsh128/cache-apt-pkgs-action) for the Thrift compiler. This change will speed up CI runs by caching dependencies between workflow executions, reducing the time spent on package installation and downloads by about 10%. ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated frontend testing workflow configuration - Implemented caching for npm dependencies - Streamlined Thrift compiler installation process - Enhanced CI performance through package caching <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Thomas Chow <[email protected]>
## Summary Added caching for Node modules and Thrift compiler in the frontend CI workflow to improve build times and reduce resource usage. Using [actions/setup-node](https://github.com/actions/setup-node#caching-global-packages-data) for npm dependencies and [awalsh128/cache-apt-pkgs-action](https://github.com/awalsh128/cache-apt-pkgs-action) for the Thrift compiler. This change will speed up CI runs by caching dependencies between workflow executions, reducing the time spent on package installation and downloads by about 10%. ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated frontend testing workflow configuration - Implemented caching for npm dependencies - Streamlined Thrift compiler installation process - Enhanced CI performance through package caching <!-- end of auto-generated comment: release notes by coderabbit.ai -->




Summary
Added caching for Node modules and Thrift compiler in the frontend CI workflow to improve build times and reduce resource usage. Using actions/setup-node for npm dependencies and awalsh128/cache-apt-pkgs-action for the Thrift compiler.
This change will speed up CI runs by caching dependencies between workflow executions, reducing the time spent on package installation and downloads by about 10%.
Checklist
Summary by CodeRabbit