Skip to content
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

Update GitHub Actions #150

Merged
merged 1 commit into from
May 15, 2024
Merged

Update GitHub Actions #150

merged 1 commit into from
May 15, 2024

Conversation

nao1215
Copy link
Owner

@nao1215 nao1215 commented May 15, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a template for submitting feature requests in the project repository.
  • Improvements

    • Renamed workflow from "LinuxUnitTest" to "Coverage" and enhanced coverage report generation.
    • Added multi-platform unit testing workflow on Linux, Windows, and macOS for different Go versions.
    • Reorganized coverage settings, excluded specific files from coverage, and adjusted badge paths.
    • Added coverage-tree and tools targets in Makefile for coverage generation and dependency tools installation.
    • Updated README to encourage unit testing and added a unit test tree map image.
  • Bug Fixes

    • Improved completeNCPUs function to return CPU cores as a string and cleaned up parameters.

Copy link
Contributor

coderabbitai bot commented May 15, 2024

Walkthrough

The recent updates streamline the project's workflow and enhance coverage reporting. A new feature request template is introduced, while the coverage workflow is renamed and optimized. Multi-platform unit testing is established, and the Makefile gains new targets for coverage tools. The README.md is updated to encourage unit testing, and minor code improvements are made for better performance and readability.

Changes

Files/Paths Change Summary
.github/ISSUE_TEMPLATE/feature-request.md Added a template for submitting feature requests.
.github/workflows/coverage.yml Renamed workflow to "Coverage" and optimized steps for running tests with coverage report output.
.github/workflows/unit_test.yml Introduced a workflow for multi-platform unit testing.
.octocov.yml Reorganized coverage settings, excluded specific files, and adjusted badge paths.
Makefile Added coverage-tree and tools targets for coverage generation.
README.md Removed unit test badges, added a section and image to encourage unit tests.
cmd/root.go Modified completeNCPUs function to improve parameter handling and return CPU core count as a string.

🐇
In the code's vast and sprawling land,
New workflows rise, well-planned.
Coverage trees and badges bright,
Guide our tests into the light.
With every change, our project grows,
Like a garden where the best code flows.
🌱


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

Code Metrics Report

main (2e97863) #150 (f54b218) +/-
Coverage 77.5% 86.1% +8.6%
Test Execution Time 4s 4s 0s
Details
  |                     | main (2e97863) | #150 (f54b218) |  +/-  |
  |---------------------|----------------|----------------|-------|
+ | Coverage            |          77.5% |          86.1% | +8.6% |
  |   Files             |             20 |             14 |    -6 |
  |   Lines             |            772 |            553 |  -219 |
- |   Covered           |            598 |            476 |  -122 |
  | Test Execution Time |             4s |             4s |    0s |

Code coverage of files in pull request scope (79.2% → 0.0%)

Files Coverage +/-
cmd/root.go 0.0% -79.2%

Reported by octocov

@nao1215
Copy link
Owner Author

nao1215 commented May 15, 2024

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented May 15, 2024

Actions Performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Repository owner deleted a comment from coderabbitai bot May 15, 2024
Repository owner deleted a comment from coderabbitai bot May 15, 2024
@nao1215 nao1215 merged commit e0ba5d5 into main May 15, 2024
19 checks passed
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

Out of diff range and nitpick comments (57)
README.md (57)

Line range hint 42-42: Remove multiple consecutive blank lines for better readability.

- 
- 
+ 

Line range hint 188-188: Remove multiple consecutive blank lines for better readability.

- 
- 
+ 

Line range hint 215-215: Remove multiple consecutive blank lines for better readability.

- 
- 
+ 

Line range hint 74-74: Remove dollar signs before commands without showing output.

- $ gup update
+ gup update

Line range hint 80-80: Remove dollar signs before commands without showing output.

- $ gup update subaru gup ubume
+ gup update subaru gup ubume

Line range hint 183-183: Remove dollar signs before commands without showing output.

- $ gup bug-report
+ gup bug-report

Line range hint 13-13: Surround headings with blank lines for better readability.

- ## Supported OS (unit testing with GitHub Actions)
+ 
+ ## Supported OS (unit testing with GitHub Actions)

Line range hint 22-22: Surround headings with blank lines for better readability.

- ## How to install
+ 
+ ## How to install

Line range hint 27-27: Surround headings with blank lines for better readability.

- ### Use "go install"
+ 
+ ### Use "go install"

Line range hint 28-28: Surround headings with blank lines for better readability.

- If you does not have the golang development environment installed on your system, please install golang from the [golang official website](https://go.dev/doc/install).
+ 
+ If you does not have the golang development environment installed on your system, please install golang from the [golang official website](https://go.dev/doc/install).

Line range hint 34-34: Surround headings with blank lines for better readability.

- ### Use homebrew
+ 
+ ### Use homebrew

Line range hint 39-39: Surround headings with blank lines for better readability.

- ### Install from Package or Binary
+ 
+ ### Install from Package or Binary

Line range hint 43-43: Surround headings with blank lines for better readability.

- ## How to use
+ 
+ ## How to use

Line range hint 44-44: Surround headings with blank lines for better readability.

- ### Update all binaries
+ 
+ ### Update all binaries

Line range hint 60-60: Surround headings with blank lines for better readability.

- ### Update the specified binary
+ 
+ ### Update the specified binary

Line range hint 70-70: Surround headings with blank lines for better readability.

- ### Exclude binaries during gup update
+ 
+ ### Exclude binaries during gup update

Line range hint 77-77: Surround headings with blank lines for better readability.

- ### Update binaries with @main or @master
+ 
+ ### Update binaries with @main or @master

Line range hint 83-83: Surround headings with blank lines for better readability.

- ### List up command name with package path and version under $GOPATH/bin
+ 
+ ### List up command name with package path and version under $GOPATH/bin

Line range hint 87-87: Surround headings with blank lines for better readability.

- ### Remove the specified binary
+ 
+ ### Remove the specified binary

Line range hint 105-105: Surround headings with blank lines for better readability.

- ### Check if the binary is the latest version
+ 
+ ### Check if the binary is the latest version

Line range hint 129-129: Surround headings with blank lines for better readability.

- ### Export/Import subcommand
+ 
+ ### Export/Import subcommand

Line range hint 153-153: Surround headings with blank lines for better readability.

- ### Generate man-pages (for linux, mac)
+ 
+ ### Generate man-pages (for linux, mac)

Line range hint 170-170: Surround headings with blank lines for better readability.

- ### Generate shell completion file (for bash, zsh, fish)
+ 
+ ### Generate shell completion file (for bash, zsh, fish)

Line range hint 180-180: Surround headings with blank lines for better readability.

- ### Desktop notification
+ 
+ ### Desktop notification

Line range hint 189-189: Surround headings with blank lines for better readability.

- ## Contributing
+ 
+ ## Contributing

Line range hint 212-212: Surround headings with blank lines for better readability.

- ## LICENSE
+ 
+ ## LICENSE

Line range hint 30-30: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 35-35: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 62-62: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 73-73: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 79-79: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 89-89: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 100-100: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 107-107: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 120-120: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 128-128: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 145-145: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 155-155: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 182-182: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 184-184: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 207-207: Surround fenced code blocks with blank lines for better readability.

- ```
+ 
+ ```
+ 

Line range hint 23-23: Surround lists with blank lines for better readability.

- - Linux
+ 
+ - Linux

Line range hint 30-30: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 47-47: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 62-62: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 73-73: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 79-79: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 89-89: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 100-100: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 107-107: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 120-120: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 133-133: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 145-145: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 155-155: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 173-173: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 182-182: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell

Line range hint 207-207: Specify a language for fenced code blocks for better syntax highlighting.

- ```
+ ```shell
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 2e97863 and 4cf680e.
Files ignored due to path filters (1)
  • doc/img/cover-tree.svg is excluded by !**/*.svg
Files selected for processing (7)
  • .github/ISSUE_TEMPLATE/feature-request.md (1 hunks)
  • .github/workflows/coverage.yml (2 hunks)
  • .github/workflows/unit_test.yml (1 hunks)
  • .octocov.yml (1 hunks)
  • Makefile (2 hunks)
  • README.md (2 hunks)
  • cmd/root.go (1 hunks)
Files skipped from review due to trivial changes (3)
  • .github/workflows/coverage.yml
  • .github/workflows/unit_test.yml
  • .octocov.yml
Additional comments not posted (1)
cmd/root.go (1)

Line range hint 61-66: LGTM! The changes to the completeNCPUs function follow Go conventions for unused parameters.


---

## Is your feature request related to a problem?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surround headings with blank lines for better readability.

- ## Is your feature request related to a problem?
+ 
+ ## Is your feature request related to a problem?

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
## Is your feature request related to a problem?
## Is your feature request related to a problem?

## Is your feature request related to a problem?
A clear and concise description of what the problem is. E.g. I'm always frustrated when ...

## Describe the solution you'd like
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surround headings with blank lines for better readability.

- ## Describe the solution you'd like
+ 
+ ## Describe the solution you'd like

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
## Describe the solution you'd like
## Describe the solution you'd like

## Describe the solution you'd like
A clear and concise description of what you want to happen.

## Describe alternatives you've considered
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surround headings with blank lines for better readability.

- ## Describe alternatives you've considered
+ 
+ ## Describe alternatives you've considered

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
## Describe alternatives you've considered
## Describe alternatives you've considered

## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

## Additional context
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surround headings with blank lines for better readability.

- ## Additional context
+ 
+ ## Additional context

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
## Additional context
## Additional context

@@ -1,4 +1,4 @@
.PHONY: build test clean vet fmt chkfmt changelog tools help
.PHONY: build test clean vet fmt chkfmt changelog tools help coverage-tree
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define the GO_INSTALL variable to avoid potential issues.

+ GO_INSTALL  = $(GO) install

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
.PHONY: build test clean vet fmt chkfmt changelog tools help coverage-tree
GO_INSTALL = $(GO) install
.PHONY: build test clean vet fmt chkfmt changelog tools help coverage-tree

@@ -197,6 +193,11 @@ Contributions are not only related to development. For example, GitHub Star moti
### Star History
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surround headings with blank lines for better readability.

- ### Star History
+ 
+ ### Star History

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
### Star History
### Star History

@@ -197,6 +193,11 @@
### Star History
[![Star History Chart](https://api.star-history.com/svg?repos=nao1215/gup&type=Date)](https://star-history.com/#nao1215/gup&Date)

### For Developers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surround headings with blank lines for better readability.

- ### For Developers
+ 
+ ### For Developers

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
### For Developers
### For Developers

When adding new features or fixing bugs, please write unit tests. The sqly is unit tested for all packages as the unit test tree map below shows.

![treemap](./doc/img/cover-tree.svg)

## Contact
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surround headings with blank lines for better readability.

- ## Contact
+ 
+ ## Contact

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
## Contact
## Contact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant