feat: test web use with ghpage#73
Conversation
WalkthroughA new Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant test-web Job
participant GitHub Pages
GitHub Actions->>test-web Job: Trigger workflow (if conditions met)
test-web Job->>test-web Job: Set environment variables
test-web Job->>test-web Job: Checkout code (with LFS)
test-web Job->>test-web Job: Setup Node.js (v16.x)
test-web Job->>test-web Job: Install dependencies (yarn)
test-web Job->>test-web Job: Build project
test-web Job->>GitHub Pages: Deploy build output (with CNAME)
✨ Finishing Touches🧪 Generate Unit Tests
🪧 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: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
.github/workflows/release-web.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release-web.yml
17-17: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
21-21: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (3)
.github/workflows/release-web.yml (3)
7-14: Validate job trigger and conditions.
Theifexpression makes this job run on manual dispatch or only after a successfulworkflow_run. Confirm this matches your desired trigger scenarios.
28-33: Install step looks good.
You passNODE_AUTH_TOKENcorrectly for private npm packages. No changes needed here.
34-40: Build step is sound.
NODE_OPTIONShandles memory limits well andPUBLIC_URLis applied. LGTM.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/release-web.yml (1)
64-71: Pin the GitHub Pages action version
LockOneKeyHQ/actions/gh-pagesto a specific tag or commit SHA instead ofmainto prevent unexpected upstream changes.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
.github/workflows/release-web.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release-web.yml
17-17: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
21-21: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: release-web
- GitHub Check: test-web
🔇 Additional comments (3)
.github/workflows/release-web.yml (3)
7-14: Clarify job trigger condition
Theifclause mixing null checks is hard to read. Confirm it covers manual dispatch and only runs after a successfulworkflow_run.
17-17: Skip: actions/checkout@v3 is up-to-date
Static analysis flagged this, butactions/checkout@v3is the latest stable version.
21-21: Skip: actions/setup-node@v3 is current
No update needed—actions/setup-node@v3is the recommended version.
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (2)
.github/workflows/release-web.yml (2)
28-33: Add dependency caching
Cacheyarnmodules between runs withactions/cache@v3to speed up installs.
Example:- name: Cache dependencies uses: actions/cache@v3 with: path: | .yarn/cache node_modules key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn-
64-71: Pin GitHub Pages action version
LockOneKeyHQ/actions/gh-pagesto a specific tag or SHA instead ofmainto prevent unexpected breaks:- uses: OneKeyHQ/actions/gh-pages@main + uses: OneKeyHQ/actions/gh-pages@v1.2.3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
.github/workflows/release-web.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release-web.yml
17-17: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
21-21: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (4)
.github/workflows/release-web.yml (4)
14-14: Verify the job conditional
Double-check theifexpression to ensure the job only runs under your intended triggers.
16-27: Checkout and Node setup look good
These steps use current actions and follow best practices.
34-46: Build step is solid
Logging and build commands are clear and effective.
47-63: Verify Build Output step is clear
The script correctly checks for thebuilddirectory and fails if it’s missing.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
.github/workflows/release-web.yml (2)
65-65: Pin the GitHub Pages action version
Use a stable tag or SHA instead ofmainto avoid unexpected upstream changes.- uses: OneKeyHQ/actions/gh-pages@main + uses: OneKeyHQ/actions/gh-pages@vX.Y.Z
28-33: Consider adding dependency caching
Cachenode_modulesor.yarn/cachebefore install to speed up CI.- name: Install Dependency env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | yarn + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: | + .yarn/cache + node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn-
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
.github/workflows/release-web.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release-web.yml
17-17: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
21-21: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (4)
.github/workflows/release-web.yml (4)
7-14: Confirm job trigger and CI override
This job runs only on manual dispatch and after a successful workflow run. Make sure that matches your intended use cases. Also, settingCI: falsemay skip built-in CI checks in your build—please confirm it’s intentional.
16-27: Checkout and setup look good
Steps use the latest major versions and correctly scope@onekeyhq.
34-46: Build steps look solid
The increased memory and variable echos aid troubleshooting.
47-63: Good verification step
Checking for./buildguards against silent failures.
Summary by CodeRabbit