Skip to content

chore: modernize CI workflow, bump dependencies, and clean up reflect usage#313

Merged
Yamashou merged 4 commits into
gqlgo:mainfrom
osamingo:chore/modernize-deps-and-ci
Jun 29, 2026
Merged

chore: modernize CI workflow, bump dependencies, and clean up reflect usage#313
Yamashou merged 4 commits into
gqlgo:mainfrom
osamingo:chore/modernize-deps-and-ci

Conversation

@osamingo

@osamingo osamingo commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Modernize the GitHub Actions workflow: switch trigger to main, add minimum permissions and concurrency group, pin actions to commit SHAs with version comments, and unify Go commands behind the Makefile.
  • Bump direct and indirect dependencies (gqlgen, gqlparser, goccy/go-yaml, testify, golang.org/x/*); split the go directive into go 1.26 + toolchain go1.26.4.
  • Replace reflect.Ptr with the recommended reflect.Pointer alias, regenerate example clients with gqlgen v0.17.91, and drop the unused newof helper in example/files-info in favor of &val.
  • Fix lint violations surfaced by pinning golangci-lint to v2.12.2.

Changes

CI / Makefile

  • Trigger branch mastermain.
  • Add permissions: contents: read and a concurrency group that cancels superseded runs.
  • Pin every action to a commit SHA with a version comment.
  • Pin golangci-lint to v2.12.2.
  • Add a build target to Makefile and call it from CI as make build.
  • Enable -race in make test.

Dependencies

  • gqlgen v0.17.73 → v0.17.91
  • gqlparser v2.5.26 → v2.5.34
  • goccy/go-yaml v1.17.1 → v1.19.2
  • testify v1.10.0 → v1.11.1
  • golang.org/x/{text,tools,mod,sync} updates
  • go 1.26.2go 1.26 + toolchain go1.26.4

Refactor

  • reflect.Ptrreflect.Pointer in clientv2/client.go and graphqljson/graphql.go.
  • Regenerate example clients with the new gqlgen: NewClient now takes clientv2.HttpClient instead of *http.Client; nullable fields are emitted as pointer + omitempty.
  • Drop newof helper in example/files-info/main.go; use &uFile directly.

Lint fixes

  • Move GenGettersGenerator.returnTypeName after exported methods (funcorder).
  • Reformat imports with gci in clientgenv2/template.go, querydocument/query_document_test.go, and generator/testdata/nullable_input_omittable/e2e_test.go.
  • Drop trailing newline in querydocument/query_document_test.go (whitespace).

Test plan

  • make build passes locally.
  • make test (with -race) passes locally.
  • CI passes on the author's fork (verification run).
  • GitHub Actions workflow turns green on this PR.

osamingo added 4 commits June 15, 2026 17:28
- switch trigger branch from master to main
- add minimum permissions (contents: read)
- add concurrency group to cancel superseded runs
- pin actions to SHA with version comments
- pin golangci-lint to v2.12.2
- add build target to Makefile and run via make build
- enable -race in make test
- gqlgen v0.17.73 -> v0.17.91
- gqlparser v2.5.26 -> v2.5.34
- goccy/go-yaml v1.17.1 -> v1.19.2
- testify v1.10.0 -> v1.11.1
- golang.org/x/{text,tools,mod,sync} updates
- split go directive: go 1.26 + toolchain go1.26.4
- replace reflect.Ptr with reflect.Pointer (Go 1.18+ recommended alias)
- regenerate example clients with gqlgen v0.17.91
  - NewClient now takes clientv2.HttpClient instead of *http.Client
  - nullable fields emitted as pointer + omitempty
- remove newof helper in example/files-info; use &val directly
- move GenGettersGenerator.returnTypeName after exported methods (funcorder)
- reformat imports with gci in clientgenv2/template.go, querydocument and
  generator testdata
- drop trailing newline in query_document_test.go (whitespace)
@osamingo
osamingo marked this pull request as ready for review June 15, 2026 09:46
@osamingo

Copy link
Copy Markdown
Contributor Author

@Yamashou Hi, Cloud you review this PR, if you have a time.:)

@Yamashou Yamashou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@osamingo

Copy link
Copy Markdown
Contributor Author

@Yamashou Could you merge this PR? (I haven't any permissions

@Yamashou
Yamashou merged commit 8c5835f into gqlgo:main Jun 29, 2026
1 check passed
@osamingo
osamingo deleted the chore/modernize-deps-and-ci branch July 6, 2026 16:15
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.

2 participants