Skip to content

Comments

chore: add go tool#1168

Merged
hwbrzzl merged 3 commits intomasterfrom
bowen/gotool
Aug 22, 2025
Merged

chore: add go tool#1168
hwbrzzl merged 3 commits intomasterfrom
bowen/gotool

Conversation

@hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Aug 22, 2025

📑 Description

Closes goravel/goravel#605

We can use go tool mockery instead of go run github.com/vektra/mockery/v2.

✅ Checks

  • Added test cases for my code

@codecov
Copy link

codecov bot commented Aug 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.54%. Comparing base (a4a1e40) to head (3d751eb).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1168      +/-   ##
==========================================
- Coverage   68.60%   68.54%   -0.06%     
==========================================
  Files         223      223              
  Lines       14475    14475              
==========================================
- Hits         9930     9922       -8     
- Misses       4169     4178       +9     
+ Partials      376      375       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: 744aa12 Previous: a4a1e40 Ratio
BenchmarkFile_ReadWrite 264885 ns/op 6258 B/op 99 allocs/op 174388 ns/op 6258 B/op 99 allocs/op 1.52
BenchmarkFile_ReadWrite - ns/op 264885 ns/op 174388 ns/op 1.52

This comment was automatically generated by workflow using github-action-benchmark.

assert.Contains(t, content, "Version")
}

func TestGetFrameworkContent(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The GetFrameworkContent function is not used actually for now, we can remove it if Go v1.24 doesn't support testing it directly. We can add the tests in goravel/example when implementing goravel/goravel#719

@hwbrzzl hwbrzzl marked this pull request as ready for review August 22, 2025 09:18
Copilot AI review requested due to automatic review settings August 22, 2025 09:18
@hwbrzzl hwbrzzl requested a review from a team as a code owner August 22, 2025 09:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modernizes the tooling approach by migrating from the traditional Go tools pattern to the new go tool directive introduced in Go 1.21. The change removes the tools.go file and updates the build configuration to use the tool directive.

  • Removed the tools.go file that was using the build constraint pattern for managing tools
  • Migrated mockery dependency from direct requirement to tool directive in go.mod
  • Updated GitHub workflow to use go tool mockery instead of go run

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tool.go Removed the entire tools.go file that managed mockery as a build tool
support/file/file_test.go Removed test function for GetFrameworkContent functionality
go.mod Moved mockery from direct dependency to tool directive and indirect dependency
.github/workflows/mockery.yml Updated workflow to use go tool mockery command

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@almas-x almas-x left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@hwbrzzl hwbrzzl merged commit 21f0aed into master Aug 22, 2025
15 of 16 checks passed
@hwbrzzl hwbrzzl deleted the bowen/gotool branch August 22, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove github.com/vektra/mockery/v2 when the lowest support golang version is 1.24

2 participants