-
Notifications
You must be signed in to change notification settings - Fork 16
Bugfix/issue 58 : Fix Build Issues & Add Submodule Support in GitHub Actions CI #68
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 updates two GitHub Actions workflow files. In the build workflow, the checkout step has been renamed and enhanced to automatically retrieve submodules, with an added manual update step. The build command has been switched from Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub as GitHub Actions
participant Repo as Repository (with Submodules)
participant Builder as Build Process
GitHub->>Repo: Checkout code with submodules (submodules: true)
Repo-->>GitHub: Return code and submodules
GitHub->>Repo: Update submodules manually (if needed)
Repo-->>GitHub: Submodules updated
GitHub->>Builder: Execute "npm run build-ci"
Builder-->>GitHub: Build process completed
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
🪧 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: 0
🧹 Nitpick comments (4)
.github/workflows/package.yml (1)
47-47: Remove Trailing Whitespace
There is trailing whitespace at the end of line 47. Please remove it to meet YAML linting standards.🧰 Tools
🪛 actionlint (1.7.4)
47-47: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
[error] 47-47: trailing spaces
(trailing-spaces)
.github/workflows/build-on-pull-request.yml (2)
16-16: Remove Trailing Whitespace
There is trailing whitespace on line 16. Removing this will help resolve YAML lint issues.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 16-16: trailing spaces
(trailing-spaces)
42-42: Missing Newline at End of File
A newline at the end of the file is missing. Please add one to adhere to best practices and YAML standards.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 42-42: no new line character at the end of file
(new-line-at-end-of-file)
package.json (1)
7-8: Prebuild and Build Script Update
The new"prebuild"script ensures that thesrc/environments/environment.tsfile exists before running the build, which is an effective safeguard against missing environment files. The updated"build"script now correctly invokes this precondition.
Consider the potential cross-platform impact of the shell command(test -f ... || touch ...)—if Windows compatibility is a requirement, you might want to explore a Node.js–based solution or use a cross-platform utility.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/build-on-pull-request.yml(2 hunks).github/workflows/package.yml(1 hunks)package.json(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/package.yml
47-47: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
.github/workflows/build-on-pull-request.yml
12-12: 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)
🪛 YAMLlint (1.35.1)
.github/workflows/package.yml
[error] 47-47: trailing spaces
(trailing-spaces)
.github/workflows/build-on-pull-request.yml
[error] 16-16: trailing spaces
(trailing-spaces)
[error] 42-42: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (2)
.github/workflows/package.yml (1)
46-51: Artifact Upload Action Update Verification
The step now usesactions/upload-artifact@v3which meets the intended upgrade. However, static analysis indicates that this version’s runner might be outdated for GitHub Actions; please verify that this change runs as expected in your CI environment.🧰 Tools
🪛 actionlint (1.7.4)
47-47: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
[error] 47-47: trailing spaces
(trailing-spaces)
[error] 50-50: trailing spaces
(trailing-spaces)
.github/workflows/build-on-pull-request.yml (1)
11-16: Enhanced Checkout with Submodules
The "Checkout code with submodules" step now includes thesubmodules: trueparameter, which ensures submodules are automatically checked out. This aligns with the PR objectives. However, similar to the artifact upload action, please double-check that the runner used withactions/checkout@v3supports these options as expected in your environment.🧰 Tools
🪛 actionlint (1.7.4)
12-12: 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)
🪛 YAMLlint (1.35.1)
[error] 16-16: trailing spaces
(trailing-spaces)
|
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: 0
🧹 Nitpick comments (2)
.github/workflows/build-on-pull-request.yml (2)
11-17: Enhanced Submodule Checkout Step with Minor Formatting Note
The updated "Checkout code with submodules" step correctly enables submodule retrieval by usingsubmodules: truewithactions/checkout@v3. This is an excellent enhancement for repositories relying on submodules. Note that static analysis flagged two issues: a potential recommendation to update the action version and trailing spaces on line 16. Please verify—according to the latest GitHub Actions documentation—ifactions/checkout@v3is ideal or if a newer version is available. Additionally, remove the trailing spaces to satisfy YAML lint requirements.- submodules: true + submodules: true🧰 Tools
🪛 actionlint (1.7.4)
12-12: 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)
🪛 YAMLlint (1.35.1)
[error] 16-16: trailing spaces
(trailing-spaces)
42-42: Build Command Update and File Formatting Improvement
Switching the build command tonpm run build-cialigns with the new CI process. Ensure that the corresponding npm script is correctly defined in yourpackage.json. Moreover, YAMLlint flagged a missing newline at the end of the file. Adding a newline will improve conformity with best practices.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 42-42: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build-on-pull-request.yml(2 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/build-on-pull-request.yml
12-12: 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)
🪛 YAMLlint (1.35.1)
.github/workflows/build-on-pull-request.yml
[error] 16-16: trailing spaces
(trailing-spaces)
[error] 42-42: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Build
🔇 Additional comments (1)
.github/workflows/build-on-pull-request.yml (1)
18-21: Added Manual Submodule Update Fallback
The introduction of the "Update submodules manually (if needed)" step is a robust fallback to ensure that submodules are fully initialized and updated recursively. This adds a layer of redundancy in case the automatic checkout does not cover all submodule scenarios.
|
|
||
| - name: Upload WAR file as artifact | ||
| uses: actions/upload-artifact@v2 | ||
| uses: actions/upload-artifact@v3 |
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.
@abhijeetw035 guess you have to use v4.
v3 is deprecated.
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.
Thank you @drtechie, should raise new PR on ADMIN-UI that updates all action's versions?



📋 Description
JIRA ID:
GitHub Issue: Fixes PSMRI/AMRIT#58
prebuildscript inpackage.jsonto ensureenvironment.tsis created before runningng build.upload-artifactaction fromv2tov3in.github/workflows/package.yml.✅ Type of Change
ℹ️ Additional Information
🔬 How Changes Were Tested
npm run buildlocally to verify that the environment file is created correctly before the build process starts.upload-artifactaction.📸 Screenshots:
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.
Summary by CodeRabbit