56 Commits

Author SHA1 Message Date
argoyle 54aad809cc Merge pull request 'chore(release): prepare for v0.1.0' (#45) from next-release into main
dbsetup / vulnerabilities (push) Successful in 2m13s
Release / release (push) Successful in 3m42s
pre-commit / pre-commit (push) Successful in 5m43s
dbsetup / test (push) Successful in 7m19s
Reviewed-on: #45
2026-01-09 08:01:40 +00:00
releaser dd09c790bb chore(release): prepare for v0.1.0 2026-01-09 07:59:22 +00:00
releaser 95201cc5ad chore(release): prepare for v0.1.0 2026-01-09 07:59:17 +00:00
argoyle e28661b667 Merge pull request 'ci: add pre-commit and release workflows' (#60) from add-workflows into main
Release / release (push) Successful in 1m36s
dbsetup / vulnerabilities (push) Successful in 2m25s
dbsetup / test (push) Successful in 2m26s
pre-commit / pre-commit (push) Has been cancelled
Reviewed-on: #60
2026-01-09 07:58:05 +00:00
argoyle c443c48690 ci: add pre-commit and release workflows
dbsetup / vulnerabilities (pull_request) Successful in 5m29s
dbsetup / test (pull_request) Successful in 5m35s
pre-commit / pre-commit (pull_request) Successful in 3m38s
- Add pre-commit workflow to run hooks on PRs and main branch pushes
- Add release workflow using shared unboundsoftware release template

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:41:38 +01:00
argoyle c2c488b81d Merge pull request 'chore: migrate module path from gitlab.com to git.unbound.se' (#59) from migrate-to-gitea into main
dbsetup / test (push) Successful in 2m35s
dbsetup / vulnerabilities (push) Successful in 3m57s
Reviewed-on: #59
2026-01-09 07:08:05 +00:00
argoyle e201b66f3d chore: migrate module path from gitlab.com to git.unbound.se
dbsetup / test (pull_request) Successful in 2m0s
dbsetup / vulnerabilities (pull_request) Successful in 2m47s
- Update go.mod module path to git.unbound.se/unboundsoftware/dbsetup
- Remove gitlab-ci-linter pre-commit hook (not applicable for Gitea)
- Update go-imports local path for new domain
- Update CLAUDE.md documentation with new paths
- Remove GitLab-specific badges from README.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:01:34 +01:00
argoyle a353e018de Merge pull request 'chore(deps): update pre-commit hook golangci/golangci-lint to v2.8.0' (#58) from renovate/golangci-golangci-lint-2.x into main
dbsetup / vulnerabilities (push) Successful in 1m9s
dbsetup / test (push) Successful in 3m29s
Reviewed-on: #58
2026-01-09 04:11:53 +00:00
renovate 2af03bdf86 chore(deps): update pre-commit hook golangci/golangci-lint to v2.8.0
dbsetup / vulnerabilities (pull_request) Successful in 2m30s
dbsetup / test (pull_request) Successful in 2m34s
2026-01-08 21:12:04 +00:00
argoyle 064b0ada58 Merge pull request 'chore(deps): update actions/setup-go action to v6' (#57) from renovate/actions-setup-go-6.x into main
dbsetup / test (push) Successful in 3m52s
dbsetup / vulnerabilities (push) Successful in 4m49s
Reviewed-on: #57
2026-01-08 15:10:09 +00:00
renovate b62be83146 chore(deps): update actions/setup-go action to v6
dbsetup / test (pull_request) Successful in 4m20s
dbsetup / vulnerabilities (pull_request) Successful in 5m50s
2026-01-08 15:03:18 +00:00
argoyle fc25920790 Merge pull request 'chore(deps): update actions/checkout action to v6' (#56) from renovate/actions-checkout-6.x into main
dbsetup / vulnerabilities (push) Successful in 6m28s
dbsetup / test (push) Successful in 6m31s
Reviewed-on: #56
2026-01-08 14:10:06 +00:00
renovate ef8cba1131 chore(deps): update actions/checkout action to v6
dbsetup / test (pull_request) Successful in 3m25s
dbsetup / vulnerabilities (pull_request) Successful in 5m29s
2026-01-08 14:02:33 +00:00
argoyle 55da707280 Merge pull request 'feat: add Gitea Actions workflow' (#55) from feat/gitea-migration into main
dbsetup / test (push) Successful in 1m21s
dbsetup / vulnerabilities (push) Successful in 1m10s
Reviewed-on: #55
2026-01-08 13:26:28 +00:00
argoyle 2f41c9ef48 feat: add Gitea Actions workflow
dbsetup / vulnerabilities (pull_request) Successful in 1m32s
dbsetup / test (pull_request) Successful in 1m34s
2026-01-08 14:21:23 +01:00
Unbound Release d61efd3b0d chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release af6597b216 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 95d4d17722 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 8777a59ced chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 70a557afce chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 82e94c7fbb chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 26436c1c91 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 14ad17748b chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 0ab624be6b chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 18250f9863 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 36ca2ca0fe chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 6206c37aac chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release f63c8fb341 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 2a5340c8c6 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release a3f9974186 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 1c26beed2b chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release ff5b418602 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 82a08a50e6 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 842b1794e0 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release cecab087c8 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
Unbound Release 6c01846189 chore(release): prepare for v0.0.4 2025-12-30 15:04:02 +00:00
argoyle d33029cb09 Merge branch 'renovate/golang-1.25.5' into 'main'
chore(deps): update golang:1.25.5 docker digest to ad03ba9

See merge request unboundsoftware/dbsetup!53
2025-12-30 15:55:34 +01:00
Renovate 2b7fa71993 chore(deps): update golang:1.25.5 docker digest to ad03ba9 2025-12-30 03:55:28 +00:00
argoyle 0f93e0723f Merge branch 'renovate/golang-1.25.5' into 'main'
chore(deps): update golang:1.25.5 docker digest to 0c27bcf

See merge request unboundsoftware/dbsetup!52
2025-12-09 09:53:14 +01:00
Renovate 710eb84f8a chore(deps): update golang:1.25.5 docker digest to 0c27bcf 2025-12-09 02:08:28 +00:00
argoyle c90ecd1247 Merge branch 'renovate/golangci-golangci-lint-2.x' into 'main'
chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.2

See merge request unboundsoftware/dbsetup!51
2025-12-08 09:40:13 +01:00
Renovate 6abde11fc5 chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.2 2025-12-07 16:55:50 +00:00
argoyle dd39632739 Merge branch 'renovate/golangci-golangci-lint-2.x' into 'main'
chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.1

See merge request unboundsoftware/dbsetup!50
2025-12-04 16:24:03 +01:00
Renovate f55d8afb36 chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.1 2025-12-04 14:56:07 +00:00
argoyle 89bc4c6640 Merge branch 'renovate/golangci-golangci-lint-2.x' into 'main'
chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.0

See merge request unboundsoftware/dbsetup!49
2025-12-04 08:27:08 +01:00
Renovate f25317e79e chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.0 2025-12-03 19:55:35 +00:00
argoyle 8ab056aad0 Merge branch 'renovate/golang-1.x' into 'main'
chore(deps): update golang docker tag to v1.25.5

See merge request unboundsoftware/dbsetup!48
2025-12-02 19:38:37 +01:00
Renovate 26e03cce50 chore(deps): update golang docker tag to v1.25.5 2025-12-02 18:07:36 +00:00
argoyle a041827a5b Merge branch 'renovate/gitleaks-gitleaks-8.x' into 'main'
chore(deps): update pre-commit hook gitleaks/gitleaks to v8.30.0

See merge request unboundsoftware/dbsetup!47
2025-11-27 00:03:42 +01:00
Renovate 36a7477f42 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.30.0 2025-11-26 18:55:41 +00:00
argoyle 5218833229 Merge branch 'renovate/gitleaks-gitleaks-8.x' into 'main'
chore(deps): update pre-commit hook gitleaks/gitleaks to v8.29.1

See merge request unboundsoftware/dbsetup!46
2025-11-20 09:19:37 +01:00
Renovate 699a879a75 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.29.1 2025-11-19 21:55:08 +00:00
argoyle 704a6c995d Merge branch 'renovate/golang-1.25.4' into 'main'
chore(deps): update golang:1.25.4 docker digest to efe81fa

See merge request unboundsoftware/dbsetup!45
2025-11-18 16:19:42 +01:00
Renovate 3676693ebb chore(deps): update golang:1.25.4 docker digest to efe81fa 2025-11-18 11:55:15 +00:00
argoyle 2f338c102d Merge branch 'renovate/golangci-golangci-lint-2.x' into 'main'
chore(deps): update pre-commit hook golangci/golangci-lint to v2.6.2

See merge request unboundsoftware/dbsetup!43
2025-11-14 16:20:36 +01:00
Renovate c2d07e9c93 chore(deps): update pre-commit hook golangci/golangci-lint to v2.6.2 2025-11-14 13:54:54 +00:00
11 changed files with 166 additions and 18 deletions
+15
View File
@@ -0,0 +1,15 @@
{
"permissions": {
"allow": [
"Bash(ls:*)",
"Bash(git -C /Users/argoyle/Source/Unbound/dbsetup log --oneline -20)",
"Bash(find:*)",
"WebSearch",
"Bash(git add:*)",
"Bash(pre-commit run:*)",
"Bash(go build:*)",
"Bash(go test:*)",
"Bash(but status)"
]
}
}
+9
View File
@@ -0,0 +1,9 @@
name: Release
on:
push:
branches: [main]
jobs:
release:
uses: unboundsoftware/shared-workflows/.gitea/workflows/Release.yml@main
+30
View File
@@ -0,0 +1,30 @@
name: dbsetup
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Run tests
run: go test -race -coverprofile=coverage.txt ./...
vulnerabilities:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Check vulnerabilities
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
+25
View File
@@ -0,0 +1,25 @@
name: pre-commit
permissions: read-all
on:
pull_request:
push:
branches:
- main
jobs:
pre-commit:
runs-on: ubuntu-latest
env:
SKIP: no-commit-to-branch
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'stable'
- uses: actions/setup-python@v5
with:
python-version: '3.14'
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- uses: pre-commit/action@v3.0.1
+2 -2
View File
@@ -7,7 +7,7 @@ include:
- project: unboundsoftware/ci-templates - project: unboundsoftware/ci-templates
file: Pre-Commit-Go.gitlab-ci.yml file: Pre-Commit-Go.gitlab-ci.yml
image: amd64/golang:1.25.4@sha256:2476911a55fb171469c5266ee3d81e180fd25592c4f74ae79488fb49578bdc96 image: amd64/golang:1.25.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
stages: stages:
- deps - deps
@@ -32,7 +32,7 @@ test:
vulnerabilities: vulnerabilities:
stage: test stage: test
image: amd64/golang:1.25.4@sha256:2476911a55fb171469c5266ee3d81e180fd25592c4f74ae79488fb49578bdc96 image: amd64/golang:1.25.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
script: script:
- go install golang.org/x/vuln/cmd/govulncheck@latest - go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./... - govulncheck ./...
+3 -10
View File
@@ -10,13 +10,6 @@ repos:
args: args:
- --allow-multiple-documents - --allow-multiple-documents
- id: check-added-large-files - id: check-added-large-files
- repo: https://gitlab.com/devopshq/gitlab-ci-linter
rev: v1.0.6
hooks:
- id: gitlab-ci-linter
args:
- --project
- unboundsoftware/dbsetup
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.23.0 rev: v9.23.0
hooks: hooks:
@@ -30,17 +23,17 @@ repos:
- id: go-imports - id: go-imports
args: args:
- -local - -local
- gitlab.com/unboundsoftware/shiny/presenter - git.unbound.se/unboundsoftware/shiny/presenter
- repo: https://github.com/lietu/go-pre-commit - repo: https://github.com/lietu/go-pre-commit
rev: v1.0.0 rev: v1.0.0
hooks: hooks:
- id: go-test - id: go-test
- id: gofumpt - id: gofumpt
- repo: https://github.com/golangci/golangci-lint - repo: https://github.com/golangci/golangci-lint
rev: v2.6.1 rev: v2.8.0
hooks: hooks:
- id: golangci-lint-full - id: golangci-lint-full
- repo: https://github.com/gitleaks/gitleaks - repo: https://github.com/gitleaks/gitleaks
rev: v8.29.0 rev: v8.30.0
hooks: hooks:
- id: gitleaks - id: gitleaks
+3 -1
View File
@@ -1 +1,3 @@
{"version":"v0.0.3"} {
"version": "v0.1.0"
}
+25 -1
View File
@@ -2,7 +2,31 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [0.0.3] - 2025-11-05 ## [0.1.0] - 2026-01-09
### 🚀 Features
- Add Gitea Actions workflow
### ⚙️ Miscellaneous Tasks
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.6.2
- *(deps)* Update golang:1.25.4 docker digest to efe81fa
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.29.1
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.30.0
- *(deps)* Update golang docker tag to v1.25.5
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.7.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.7.1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.7.2
- *(deps)* Update golang:1.25.5 docker digest to 0c27bcf
- *(deps)* Update golang:1.25.5 docker digest to ad03ba9
- *(deps)* Update actions/checkout action to v6
- *(deps)* Update actions/setup-go action to v6
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.8.0
- Migrate module path from gitlab.com to git.unbound.se
- Add pre-commit and release workflows
## [0.0.3] - 2025-11-13
### 🐛 Bug Fixes ### 🐛 Bug Fixes
+53
View File
@@ -0,0 +1,53 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
**dbsetup** is a Go helper module for database connection pool initialization with OpenTelemetry (OTEL) instrumentation. It wraps database connections with OTEL to automatically add SQL queries to tracing spans.
- Module path: `git.unbound.se/unboundsoftware/dbsetup`
- Primary dependencies: sqlx, goose (migrations), otelsqlx (OTEL wrapper)
## Common Commands
```bash
# Download dependencies
go mod download
# Run tests with race detection and coverage
CGO_ENABLED=1 go test -race -coverprofile=coverage.txt ./...
# Generate coverage report
go tool cover -html=coverage.txt -o coverage.html
# Check for security vulnerabilities
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
# Run pre-commit hooks (add all files first)
git add -A && pre-commit run --all-files
```
## Architecture
Single-package module with one source file (`database.go`):
- **DatabaseConfig**: Configuration struct with connection URL, driver name, and pool settings. Uses struct tags compatible with kong CLI parser.
- **Database**: Main handler providing:
- `SetupDB()` - Validates database connection and returns Database instance
- `Connect()` - Creates OTEL-wrapped connection pool via otelsqlx
- `RunMigrations()` - Executes goose migrations from an `fs.FS` filesystem
## Code Quality
Pre-commit hooks enforce:
- gofumpt formatting (stricter than gofmt)
- golangci-lint
- go-imports with local path `git.unbound.se/unboundsoftware/`
- Conventional commits format (feat:, fix:, chore:, etc.)
- Gitleaks for secret detection
## CI/CD
GitLab CI pipeline runs: dependency download → tests with race detector → vulnerability scanning → Codecov upload.
-3
View File
@@ -2,6 +2,3 @@
Helper module for setting up database connection pool using an Helper module for setting up database connection pool using an
OTEL-wrapper which adds the actual query to a span. OTEL-wrapper which adds the actual query to a span.
[![Build Status](https://gitlab.com/unboundsoftware/dbsetup/badges/main/pipeline.svg)](https://gitlab.com/unboundsoftware/dbsetup/commits/main)
[![codecov](https://codecov.io/gl/unboundsoftware/dbsetup/branch/main/graph/badge.svg?token=XHA5XE1UVL)](https://codecov.io/gl/unboundsoftware/dbsetup)
+1 -1
View File
@@ -1,4 +1,4 @@
module gitlab.com/unboundsoftware/dbsetup module git.unbound.se/unboundsoftware/dbsetup
go 1.24.4 go 1.24.4