-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
GitHub action #2986
base: dev
Are you sure you want to change the base?
GitHub action #2986
Conversation
📝 WalkthroughWalkthroughWalkthroughThe changes introduce a new GitHub Actions workflow defined in the Changes
Poem
Suggested labels
Suggested reviewers
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 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 (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 (
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This is a test pr? |
Yeah mainly for arm64 |
This comment has been minimized.
This comment has been minimized.
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
2b03193
to
7f887f5
Compare
This comment has been minimized.
This comment has been minimized.
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 (1)
.github/workflows/dotnet.yml (1)
31-40
: Setup .NET Step and Trailing Whitespace Cleanup
The .NET setup step correctly specifies the version usingactions/setup-dotnet@v4
withdotnet-version: 7.0.x
. One minor issue: static analysis has flagged a trailing whitespace on line 38. Please remove any trailing spaces to ensure YAML lint compliance.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 38-38: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/dotnet.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/dotnet.yml
[error] 38-38: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (11)
.github/workflows/dotnet.yml (11)
6-13
: Review Workflow Trigger Configuration and Event Selection
The workflow is configured to trigger on manual dispatch (workflow_dispatch
), pushes to thedev
andmaster
branches, and pull requests. This is a sound setup for many scenarios. However, since the PR objectives mention arm64 support, please verify that these triggers and the current runner selection fully support arm64-specific builds—or if additional conditional logic or a matrix strategy is needed.
17-21
: Check Job Runner and Environment Settings for ARM64 Support
The job runs onwindows-latest
with environment variables such as a hardcodedFlowVersion
. While hardcoding the version is consistent with previous discussions (see past review comments), note thatwindows-latest
typically targets x64 architectures. Confirm that this is intentional given the PR’s focus on arm64 support. If arm64 builds are required, you might need to adjust the runner configuration (or introduce a matrix) to accommodate that architecture.
24-30
: Validate the Project Version Update Step
The step that updates the project version using thevers-one/[email protected]
action is implemented correctly. The glob pattern ("**/SolutionAssemblyInfo.cs"
) appropriately targets the necessary files, and the version is composed from theFlowVersion
andBUILD_NUMBER
environment variables.
41-47
: Verify vpk Installation Logic
The step checking for thevpk
tool and installing it if absent is clear and robust. The use ofGet-Command
provides a safe check before installation.
48-49
: Confirm Dependency Restoration
Usingdotnet restore --locked-mode
ensures strict adherence to locked dependency versions, which is excellent for reproducible builds.
50-51
: Build Step Validation
The build command (dotnet build --no-restore -c Release
) efficiently utilizes the previous restore step and adheres to the Release configuration.
52-55
: Service Initialization Considerations
The workflow configures and starts the Windows Search service (usingsc config
andnet start
) to support tests likeExplorerTest
. Please verify that initiating this service in the GitHub Actions environment does not adversely affect other steps or lead to unexpected side effects.
56-57
: Test Execution Confirmation
The test step, which executesdotnet test
with no rebuild and enhanced verbosity, is correctly structured.
58-60
: Post-Build Task Execution Review
The post-build task runs a PowerShell script (Scripts\post_build.ps1
) with the proper versioning arguments. Please ensure that the script exists in the expected location and includes appropriate error handling.
61-96
: Artifact Upload Steps Consistency and Maintenance
The series of artifact upload steps—covering the Plugin Nupkg, Flow Installer, Portable Version, Full nupkg, and Release Information—are consistently implemented usingactions/upload-artifact@v4
. Double-check that all file path patterns correctly match the output directories and that any future changes to output naming conventions are promptly updated in this workflow.
1-97
: Overall Workflow Assessment
This new GitHub Actions workflow file effectively automates the build, test, and artifact upload pipeline for the .NET project. The structure is clear and adheres to best practices. Just ensure that the current runner configuration and environment settings align with the arm64 support objectives of this PR.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 38-38: trailing spaces
(trailing-spaces)
This comment has been minimized.
This comment has been minimized.
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/dotnet.yml (2)
14-22
: Job and Environment Setup
The jobs section properly defines the build job withruns-on: windows-latest
and sets the necessary environment variables. Note that theFlowVersion
is hardcoded as1.19.5
which aligns with our previous approach (as seen in AppVeyor). While this is acceptable for now, consider parameterizing the version in future updates for enhanced flexibility.
35-40
: Caching Configuration Comment and Trailing Whitespace
The caching configuration is currently commented out, which is acceptable given our existing practices in AppVeyor.
Note: There is trailing whitespace detected on line 38. Removing this extra space will ensure compliance with YAML linting rules.Proposed Diff:
-# Flow.Launcher.Core/packages.lock.json +# Flow.Launcher.Core/packages.lock.json🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 38-38: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/dotnet.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/dotnet.yml
[error] 38-38: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (16)
.github/workflows/dotnet.yml (16)
1-3
: Clear Workflow Documentation
The workflow header and accompanying comments clearly explain the purpose and provide a reference to the official GitHub documentation.
4-5
: Workflow Naming is Appropriate
The workflow is aptly named "Build", which succinctly reflects its function.
6-13
: Workflow Trigger Configuration
The workflow is correctly triggered on manual dispatch, pushes to the "dev" and "master" branches, as well as pull requests. This comprehensive trigger setup ensures builds are run in all the required contexts.
23-31
: Source Checkout and Version Update
The use ofactions/checkout@v4
and the version updater (vers-one/[email protected]
) is correctly implemented. The concatenation ofFlowVersion
with the build number to update the project version is clear and effective.
32-34
: .NET Environment Setup
Setting up the .NET environment usingactions/setup-dotnet@v4
withdotnet-version: 7.0.x
is well configured and ensures consistency in the build environment.
41-42
: vpk Tool Installation
The step to install thevpk
tool usingdotnet tool install -g vpk
is straightforward and should function as expected.
43-44
: Dependency Restoration
Executingdotnet restore --locked-mode
to restore project dependencies is correctly implemented.
45-46
: Build Step Execution
The build command (dotnet build --no-restore -c Release
) is well-chosen for a Release configuration build and optimizes the process by skipping an additional restore.
47-51
: Service Initialization
The step initializing the Windows Search service is clearly documented and critical for running ExplorerTest. Ensure that this method of service startup remains consistent across the Windows-latest runners used by GitHub Actions.
52-52
: Test Execution
The command to run tests (dotnet test --no-build --verbosity normal -c Release
) is succinctly and appropriately configured.
53-55
: Post-Build Task Execution
Invoking the PowerShell scriptpost_build.ps1
with the required version and build parameters is correct. This step effectively finalizes post-build tasks.
56-63
: Plugin Artifact Upload
The artifact upload step for the Plugin NuGet package is set up correctly with clear artifact naming and proper compression settings.
64-69
: Installer Artifact Upload
Uploading the Flow Installer executable is clearly defined and should reliably capture the intended artifact using the specified file pattern.
70-76
: Portable Version Artifact Upload
The configuration for uploading the portable version artifact is correct, with clear naming and compression parameters.
77-84
: Full NuGet Package Artifact Upload
The step for uploading the full NuGet package (FlowLauncher-*-full.nupkg
) is correctly configured. Verify that the specified pattern accurately matches the generated package file.
85-91
: Release Information Artifact Upload
The final artifact upload, which captures the release information from theRELEASES
file, is correctly established.
This comment has been minimized.
This comment has been minimized.
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 (5)
.github/workflows/dotnet.yml (5)
14-22
: Job Setup and Environment Variables
The 'build' job is configured to run on a Windows environment, with environment variables such asFlowVersion
(hardcoded as 1.19.5),NUGET_CERT_REVOCATION_MODE
, andBUILD_NUMBER
set appropriately. If hardcoding the version is intentional—as confirmed in previous discussions—this is acceptable; otherwise, consider parameterizing this value for greater flexibility.
31-40
: .NET Setup and Caching Configuration
Setting up .NET with version7.0.x
is correctly handled. The commented-out caching settings indicate previous configuration attempts; if caching is beneficial for your workflow, consider enabling them (after also addressing formatting issues such as the trailing spaces on line 38 flagged by YAMLlint).🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 38-38: trailing spaces
(trailing-spaces)
47-50
: Initialize Windows Search Service
The steps to configure and start the Windows Search (WSearch) service are necessary for running tests such as ExplorerTest. Consider introducing error handling in case the service fails to start, which could otherwise interrupt the workflow.
53-55
: Post-Build Task Execution
Invoking the PowerShell scriptpost_build.ps1
to perform additional tasks is a sound approach. It might be worthwhile to verify that the script includes robust error handling and logging, to ease future troubleshooting.
77-84
: Artifact Upload: Full Nupkg
The full NuGet package upload uses the artifact nameFlowLauncher-*-full.nupkg
. Note the slight naming difference (no period between "Flow" and "Launcher") when compared to other artifact names. Confirm whether this discrepancy is intentional or if consistency should be enforced.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/dotnet.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/dotnet.yml
[error] 38-38: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (10)
.github/workflows/dotnet.yml (10)
1-3
: Header Comments and Workflow Overview
The header comments clearly explain the purpose of this workflow and provide a useful link for more details.
4-13
: Workflow Triggers Configuration
The workflow is triggered on manual dispatch, pushes to the dev and master branches, and pull requests. This setup is straightforward and aligns with your PR objectives. Ensure that branch names remain consistent with your repository strategy.
23-30
: Version Update Step
The step using thevers-one/dotnet-project-version-updater
action targets allSolutionAssemblyInfo.cs
files correctly and updates the version usingFlowVersion
andBUILD_NUMBER
. This ensures the assembly version reflects the current build accurately.
41-44
: Tool Installation and Dependency Restoration
Installing thevpk
tool and restoring dependencies usingdotnet restore --locked-mode
are both implemented appropriately, ensuring that tooling and packages are in sync with your build expectations.
45-46
: Build Step
The build command (dotnet build --no-restore -c Release
) is concise and effective, using the pre-restored dependencies to speed up the build process.
51-52
: Test Execution Step
Executing tests withdotnet test --no-build --verbosity normal -c Release
is efficient and avoids redundant builds. Ensure that your test suite is comprehensive to maintain quality.
56-62
: Artifact Upload: Plugin Nupkg
The configuration for uploading the Plugin NuGet package is clearly specified with the correct artifact name and path. Double-check that the wildcard pattern (Flow.Launcher.Plugin.*.nupkg
) aligns with the produced file naming conventions.
63-69
: Artifact Upload: Flow Installer
The upload step for the Flow Installer executable correctly identifies the artifact and uses an appropriate path pattern (Flow-Launcher-*.exe
). This consistency supports reliable artifact packaging.
70-76
: Artifact Upload: Portable Version
Uploading the portable version is handled correctly, with clear naming (Flow-Launcher-Portable.zip
) and path settings.
85-91
: Artifact Upload: Release Information
The final step reliably packages theRELEASES
file, ensuring that release information is preserved and uploaded as an artifact.
This comment has been minimized.
This comment has been minimized.
🥷 Code experts: jjw24 jjw24 has most 🧠 knowledge in the files. See details
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
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 (1)
Scripts/post_build.ps1 (1)
74-75
: Comment contradicts the actual implementationThe comment on line 74 states "dotnet pack is not used because ran into issues," but the implementation now uses
dotnet pack
. Either update the comment to reflect the current implementation or document any special considerations that were addressed to makedotnet pack
work.- # dotnet pack is not used because ran into issues, need to test installation and starting up if to use it. + # Now using dotnet pack instead of nuget pack for better integration with modern .NET SDK projects dotnet pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Scripts/post_build.ps1
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (3)
Scripts/post_build.ps1 (3)
36-36
: Path update makes sense for GitHub Actions environmentUsing
$env:NUGET_PACKAGES
instead of the previous$USERPROFILE
path is more precise and works better in CI environments like GitHub Actions. This change properly aligns with the PR's objective of moving from AppVeyor to GitHub Actions.
43-43
: Good fix for file filtering logicThe change to use
-Filter
parameter with$i.Name
is an improvement over the previous approach. This ensures proper filtering by accessing the Name property of the FileInfo object, which makes the duplicate detection logic more accurate.
82-82
: Path consistency improvement for Squirrel aliasThis change aligns with the update on line 36, consistently using
$env:NUGET_PACKAGES
to locate Squirrel.exe. This is a good practice to ensure all references to the same tool use the same environment variable.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
Add a github action workflow to build artifact.
Why?