Skip to content

Conversation

k1LoW
Copy link
Owner

@k1LoW k1LoW commented Mar 19, 2025

This pull request introduces a new feature to support checksum verification for assets. The changes span across multiple files to integrate this functionality into the setup process. The most important changes include updates to the README.md and action.yml files to document and handle the new checksum input, modifications to the setup.go file to implement checksum verification, and the addition of tests to ensure the correctness of the checksum feature.

Documentation and Input Handling:

  • README.md: Added checksum as a new input parameter and updated the example usage to include the checksum field. [1] [2] [3]
  • action.yml: Introduced the checksum input parameter with a description and default value. [1] [2]

Code Implementation:

  • setup/setup.go: Added imports for various hashing algorithms, included a new Checksum field in the Option struct, and implemented the checksum function to verify the checksum of the asset. [1] [2] [3] [4]

Command Line Integration:

Testing:

  • setup/setup_test.go: Added comprehensive tests for the checksum verification function, covering various algorithms and edge cases.

@k1LoW k1LoW added enhancement New feature or request minor labels Mar 19, 2025
@k1LoW k1LoW self-assigned this Mar 19, 2025

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

Code Metrics Report

main (e443730) #125 (d8ef600) +/-
Coverage 49.1% 52.2% +3.1%
Code to Test Ratio 1:0.1 1:0.4 +0.2
Test Execution Time 35s 37s +2s
Details
  |                     | main (e443730) | #125 (d8ef600) |  +/-  |
  |---------------------|----------------|----------------|-------|
+ | Coverage            |          49.1% |          52.2% | +3.1% |
  |   Files             |              5 |              5 |     0 |
  |   Lines             |            407 |            442 |   +35 |
+ |   Covered           |            200 |            231 |   +31 |
+ | Code to Test Ratio  |          1:0.1 |          1:0.4 |  +0.2 |
  |   Code              |            581 |            643 |   +62 |
+ |   Test              |            103 |            259 |  +156 |
- | Test Execution Time |            35s |            37s |   +2s |

Code coverage of files in pull request scope (48.6% → 52.9%)

Files Coverage +/-
cmd/root.go 0.0% 0.0%
gh/client.go 81.0% -0.3%
setup/setup.go 37.3% +18.3%

Reported by octocov

@k1LoW k1LoW merged commit 0526e04 into main Mar 19, 2025
6 checks passed
@k1LoW k1LoW deleted the checksum branch March 19, 2025 08:50
@github-actions github-actions bot mentioned this pull request Mar 19, 2025
@k1LoW k1LoW removed the minor label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant