Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/generated-code-guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ jobs:
cache: true
cache-dependency-path: go.sum

- name: Download dependencies
- name: Prime codegen tool cache
if: steps.changes.outputs.storage_any_changed == 'true' || steps.changes.outputs.api_any_changed == 'true'
run: go mod download
run: |
go mod download
go tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -version
go tool github.com/sqlc-dev/sqlc/cmd/sqlc version
Comment on lines +59 to +64

Choose a reason for hiding this comment

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

P1 Badge Replace invalid go tool cache priming

The new cache step runs go tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -version and go tool github.com/sqlc-dev/sqlc/cmd/sqlc version. go tool only accepts built‑in tool names or paths to already installed binaries, so invoking it with module paths errors with go tool: no such tool .... As a result the workflow will fail whenever generated files change and never reach the validation steps. Use go run or go install to warm the module cache instead.

Useful? React with 👍 / 👎.


- name: Validate storage sqlc output
if: steps.changes.outputs.storage_any_changed == 'true'
Expand Down