Skip to content

chore: upgrade to Go 1.22, update dependencies and CI - #112

Merged
kolkov merged 3 commits into
masterfrom
chore/go-1.22-ci-update
Sep 3, 2026
Merged

kolkov merged 3 commits into
masterfrom
chore/go-1.22-ci-update

Conversation

@kolkov

@kolkov kolkov commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Modernize ozzo-dbx: bump Go version, update all dependencies, improve CI pipeline.

go.mod

  • go 1.13 → go 1.22
  • go-sql-driver/mysql v1.4.1 → v1.9.3 (latest compatible with Go 1.22; v1.10+ requires Go 1.24)
  • stretchr/testify v1.4.0 → v1.12.1
  • Removed google.golang.org/appengine indirect dependency

Code cleanup

  • ioutil.ReadFile → os.ReadFile (deprecated since Go 1.16)

CI

  • actions/setup-go@v6 → @v7
  • Added golangci-lint-action@v9 (matches ozzo-validation CI)

README

  • Requirements: "Go 1.21" → "Go 1.22"

Test plan

  • go build ./... — passes
  • go vet ./... — passes
  • gofmt -l . — clean
  • CI (MySQL integration tests + golangci-lint)

- Bump go directive from 1.13 to 1.22
- Update github.com/go-sql-driver/mysql v1.4.1 -> v1.9.3
- Update github.com/stretchr/testify v1.4.0 -> v1.12.1
- Remove obsolete google.golang.org/appengine indirect dep
- Replace deprecated ioutil.ReadFile with os.ReadFile in db_test.go
- Update README requirements to Go 1.22
- Bump actions/setup-go@v6 -> @v7 in CI
- Add golangci-lint step to CI lint job
@kolkov kolkov added type: enhancement Improve existing feature priority: medium Normal development priority labels Sep 3, 2026
@codecov

codecov Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.59%. Comparing base (810fa00) to head (44449eb).

Files with missing lines Patch % Lines
query.go 14.28% 6 Missing ⚠️
db.go 0.00% 2 Missing ⚠️
expression.go 83.33% 1 Missing ⚠️
model_query.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #112   +/-   ##
=======================================
  Coverage   86.59%   86.59%           
=======================================
  Files          16       16           
  Lines        1514     1514           
=======================================
  Hits         1311     1311           
  Misses        154      154           
  Partials       49       49           
Flag Coverage Δ
unittests 86.59% <71.42%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

- errcheck: check error returns, use _ = for standard cleanup
- staticcheck: strings.ReplaceAll, time.Since, type switch assignments
- govet: nolint for reflect.Ptr toolchain mismatch, reflect.PointerTo
- unused: remove unused struct field
- example_test.go: nolint:errcheck for godoc examples
The Exclude().Insert() test intentionally inserts NULL name,
which causes scan error when reading into string (not NullString).
Original code silently ignored this — restore that behavior.
@kolkov
kolkov merged commit e372464 into master Sep 3, 2026
4 of 5 checks passed
@kolkov
kolkov deleted the chore/go-1.22-ci-update branch September 3, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Normal development priority type: enhancement Improve existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant