86 Commits

Author SHA1 Message Date
releaser eaaf23aa00 chore(release): prepare for v0.1.3 2026-03-22 18:53:55 +00:00
releaser 1aef79af66 chore(release): prepare for v0.1.3 2026-03-22 18:53:54 +00:00
renovate 46493a3896 chore(deps): update pre-commit hook golangci/golangci-lint to v2.11.4 (#85)
Release / release (push) Failing after 1m8s
dbsetup / vulnerabilities (push) Successful in 1m36s
dbsetup / test (push) Successful in 2m16s
pre-commit / pre-commit (push) Successful in 6m20s
2026-03-22 18:21:21 +00:00
renovate 3728e83db5 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.30.1 (#83)
Release / release (push) Successful in 1m10s
dbsetup / vulnerabilities (push) Successful in 2m3s
dbsetup / test (push) Successful in 3m7s
pre-commit / pre-commit (push) Successful in 7m5s
2026-03-12 16:14:28 +00:00
renovate 2c687986a7 chore(deps): update pre-commit hook golangci/golangci-lint to v2.11.3 (#81)
dbsetup / test (push) Successful in 3m20s
dbsetup / vulnerabilities (push) Successful in 2m45s
Release / release (push) Successful in 1m33s
pre-commit / pre-commit (push) Successful in 6m42s
2026-03-10 11:14:46 +00:00
renovate de09e37727 chore(deps): update pre-commit hook golangci/golangci-lint to v2.11.2 (#79)
dbsetup / test (push) Successful in 2m23s
dbsetup / vulnerabilities (push) Successful in 5m25s
pre-commit / pre-commit (push) Successful in 8m11s
Release / release (push) Successful in 12m56s
2026-03-07 22:11:21 +00:00
renovate 3ba763181c chore(deps): update pre-commit hook golangci/golangci-lint to v2.11.1 (#77)
Release / release (push) Successful in 1m10s
dbsetup / vulnerabilities (push) Successful in 1m56s
dbsetup / test (push) Successful in 3m10s
pre-commit / pre-commit (push) Successful in 6m5s
2026-03-06 15:34:13 +00:00
argoyle 480ff9d065 Merge pull request 'chore(release): prepare for v0.1.2' (#75) from next-release into main
Release / release (push) Successful in 56s
dbsetup / vulnerabilities (push) Successful in 3m47s
dbsetup / test (push) Successful in 4m55s
pre-commit / pre-commit (push) Successful in 11m54s
Reviewed-on: #75
2026-02-22 18:18:17 +00:00
releaser c5ff80dc6e chore(release): prepare for v0.1.2
dbsetup / vulnerabilities (pull_request) Successful in 5m56s
dbsetup / test (pull_request) Successful in 7m18s
pre-commit / pre-commit (pull_request) Successful in 25m7s
2026-02-22 17:52:37 +00:00
releaser 1f8708deb2 chore(release): prepare for v0.1.2 2026-02-22 17:52:34 +00:00
argoyle 2e3bb64381 Merge pull request 'fix(deps): update module github.com/pressly/goose/v3 to v3.27.0' (#74) from renovate/github.com-pressly-goose-v3-3.x into main
Release / release (push) Successful in 3m42s
dbsetup / vulnerabilities (push) Successful in 7m15s
dbsetup / test (push) Successful in 14m12s
pre-commit / pre-commit (push) Successful in 24m59s
Reviewed-on: #74
2026-02-22 17:48:45 +00:00
renovate 0d0a3291fa fix(deps): update module github.com/pressly/goose/v3 to v3.27.0
dbsetup / vulnerabilities (pull_request) Successful in 13m22s
dbsetup / test (pull_request) Successful in 15m49s
pre-commit / pre-commit (pull_request) Successful in 37m20s
2026-02-22 17:04:31 +00:00
renovate 4a04370f50 chore(deps): update pre-commit hook golangci/golangci-lint to v2.10.1 (#72)
Release / release (push) Successful in 1m13s
dbsetup / vulnerabilities (push) Successful in 3m11s
dbsetup / test (push) Successful in 3m30s
pre-commit / pre-commit (push) Successful in 7m47s
2026-02-17 17:04:12 +00:00
renovate 761154be92 chore(deps): update pre-commit hook golangci/golangci-lint to v2.9.0 (#71)
dbsetup / vulnerabilities (push) Failing after 2s
dbsetup / test (push) Failing after 2s
pre-commit / pre-commit (push) Failing after 2s
Release / release (push) Successful in 39s
2026-02-11 10:35:33 +00:00
argoyle 87e9adac97 Merge pull request 'ci: add code coverage integration' (#69) from ci-coverage-integration into main
Release / release (push) Successful in 4m32s
dbsetup / vulnerabilities (push) Successful in 7m57s
dbsetup / test (push) Successful in 8m17s
pre-commit / pre-commit (push) Successful in 15m7s
Reviewed-on: #69
2026-01-28 12:38:13 +00:00
argoyle d0e92e767a ci: add code coverage integration
dbsetup / test (pull_request) Successful in 7m10s
dbsetup / vulnerabilities (pull_request) Successful in 6m34s
pre-commit / pre-commit (pull_request) Successful in 11m20s
Add go-test-coverage for coverage threshold enforcement. Coverage data
is uploaded as artifacts on main branch and compared against baseline
in PRs using shell script that gracefully handles first run without
baseline. PR comments show coverage percentage.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:03:07 +01:00
argoyle 379a820a70 Merge pull request 'chore: remove unused .gitlab-ci.yml' (#68) from remove-gitlab-ci into main
Release / release (push) Successful in 3m43s
dbsetup / test (push) Successful in 5m50s
dbsetup / vulnerabilities (push) Successful in 7m15s
pre-commit / pre-commit (push) Successful in 14m52s
Reviewed-on: #68
2026-01-23 14:56:24 +00:00
argoyle 2025050f72 chore: remove unused .gitlab-ci.yml
dbsetup / vulnerabilities (pull_request) Successful in 3m52s
dbsetup / test (pull_request) Successful in 6m2s
pre-commit / pre-commit (pull_request) Successful in 6m17s
No longer needed after migration to Gitea Actions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:34:51 +01:00
renovate 2341ab5a10 chore(deps): update golang docker tag to v1.25.6 (#67)
dbsetup / test (push) Successful in 1m32s
Release / release (push) Successful in 2m53s
dbsetup / vulnerabilities (push) Successful in 3m54s
pre-commit / pre-commit (push) Successful in 8m5s
2026-01-15 22:25:51 +00:00
renovate f01cfc08af chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.24.0 (#65)
Release / release (push) Successful in 1m3s
dbsetup / vulnerabilities (push) Successful in 4m10s
dbsetup / test (push) Successful in 4m30s
pre-commit / pre-commit (push) Successful in 17m39s
2026-01-13 21:15:21 +00:00
renovate 082a672a34 chore(deps): update golang:1.25.5 docker digest to 3a01526 (#64)
Release / release (push) Failing after 51s
dbsetup / vulnerabilities (push) Successful in 1m3s
dbsetup / test (push) Successful in 1m27s
pre-commit / pre-commit (push) Successful in 15m34s
2026-01-13 06:14:33 +00:00
argoyle 3fee690ea3 Merge pull request 'chore(release): prepare for v0.1.1' (#62) from next-release into main
Release / release (push) Successful in 33s
dbsetup / test (push) Successful in 2m11s
dbsetup / vulnerabilities (push) Successful in 3m43s
pre-commit / pre-commit (push) Successful in 7m27s
Reviewed-on: #62
2026-01-09 13:24:14 +00:00
releaser 3b8d953aa4 chore(release): prepare for v0.1.1
dbsetup / test (pull_request) Successful in 2m48s
dbsetup / vulnerabilities (pull_request) Successful in 4m6s
pre-commit / pre-commit (pull_request) Successful in 7m7s
2026-01-09 13:13:54 +00:00
releaser 37740b6bc2 chore(release): prepare for v0.1.1 2026-01-09 13:13:48 +00:00
argoyle 731464b9a9 Merge pull request 'chore: migrate module path to gitea.unbound.se' (#63) from migrate-to-gitea into main
dbsetup / vulnerabilities (push) Successful in 1m7s
Release / release (push) Successful in 2m7s
dbsetup / test (push) Successful in 6m36s
pre-commit / pre-commit (push) Successful in 11m2s
Reviewed-on: #63
2026-01-09 13:11:52 +00:00
argoyle f1a91fdd40 chore: migrate module path to gitea.unbound.se
dbsetup / vulnerabilities (pull_request) Successful in 3m1s
dbsetup / test (pull_request) Successful in 3m6s
pre-commit / pre-commit (pull_request) Successful in 4m49s
Update module path from git.unbound.se to gitea.unbound.se for Go module
discovery over HTTPS.
2026-01-09 13:43:44 +01:00
releaser 76097b8ff2 chore(release): prepare for v0.1.1
dbsetup / vulnerabilities (pull_request) Successful in 6m33s
dbsetup / test (pull_request) Successful in 6m43s
pre-commit / pre-commit (pull_request) Successful in 11m53s
2026-01-09 09:05:16 +00:00
releaser 69786d9b8d chore(release): prepare for v0.1.1 2026-01-09 09:05:12 +00:00
argoyle 661f95fb5f Merge pull request 'chore(deps): update actions/setup-python action to v6' (#61) from renovate/actions-setup-python-6.x into main
Release / release (push) Successful in 1m34s
dbsetup / vulnerabilities (push) Successful in 6m47s
dbsetup / test (push) Successful in 8m25s
pre-commit / pre-commit (push) Successful in 14m22s
Reviewed-on: #61
2026-01-09 09:04:14 +00:00
renovate 7b740036d0 chore(deps): update actions/setup-python action to v6
dbsetup / vulnerabilities (pull_request) Successful in 2m23s
dbsetup / test (pull_request) Successful in 2m30s
pre-commit / pre-commit (pull_request) Successful in 5m5s
2026-01-09 08:07:52 +00:00
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
13 changed files with 303 additions and 87 deletions
+16
View File
@@ -0,0 +1,16 @@
{
"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)",
"Bash(but --help:*)"
]
}
}
+9
View File
@@ -0,0 +1,9 @@
name: Release
on:
push:
branches: [main]
jobs:
release:
uses: unboundsoftware/shared-workflows/.gitea/workflows/Release.yml@main
+85
View File
@@ -0,0 +1,85 @@
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 ./...
- name: Check coverage
uses: vladopajic/go-test-coverage@v2
with:
config: ./.testcoverage.yml
# Download baseline coverage from main branch (for PRs)
- name: Download baseline coverage
if: gitea.event_name == 'pull_request'
uses: actions/download-artifact@v3
with:
name: coverage-baseline
path: ./baseline
continue-on-error: true
# Compare coverage against baseline (for PRs)
- name: Compare coverage
if: gitea.event_name == 'pull_request'
run: |
CURRENT=$(go tool cover -func=coverage.txt | grep "^total:" | awk '{print $NF}' | tr -d '%')
if [ -f ./baseline/coverage.txt ]; then
BASE=$(go tool cover -func=./baseline/coverage.txt | grep "^total:" | awk '{print $NF}' | tr -d '%')
echo "Base coverage: ${BASE}%"
echo "Current coverage: ${CURRENT}%"
if [ "$(echo "$CURRENT < $BASE" | bc -l)" -eq 1 ]; then
echo "::error::Coverage decreased from ${BASE}% to ${CURRENT}%"
exit 1
fi
echo "Coverage maintained or improved: ${BASE}% -> ${CURRENT}%"
else
echo "No baseline coverage found, skipping comparison"
echo "Current coverage: ${CURRENT}%"
fi
# Upload coverage as baseline (only on main)
- name: Upload coverage baseline
if: gitea.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: coverage-baseline
path: coverage.txt
retention-days: 90
# Post coverage to PR comment
- name: Post coverage comment
if: gitea.event_name == 'pull_request'
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_URL: ${{ gitea.server_url }}
run: |
COVERAGE=$(go tool cover -func=coverage.txt | grep "^total:" | awk '{print $NF}')
curl -X POST "${GITEA_URL}/api/v1/repos/${{ gitea.repository }}/issues/${{ gitea.event.pull_request.number }}/comments" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"body\": \"## Coverage Report\n\nTotal coverage: **${COVERAGE}**\"}"
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@v6
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
-38
View File
@@ -1,38 +0,0 @@
include:
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
- project: unboundsoftware/ci-templates
file: Defaults.gitlab-ci.yml
- project: unboundsoftware/ci-templates
file: Release.gitlab-ci.yml
- project: unboundsoftware/ci-templates
file: Pre-Commit-Go.gitlab-ci.yml
image: amd64/golang:1.25.4@sha256:2476911a55fb171469c5266ee3d81e180fd25592c4f74ae79488fb49578bdc96
stages:
- deps
- test
deps:
stage: deps
script:
- go mod download
test:
stage: test
dependencies:
- deps
script:
- CGO_ENABLED=1 go test -mod=readonly -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
- go tool cover -html=coverage.txt -o coverage.html
- go tool cover -func=coverage.txt
- curl -Os https://uploader.codecov.io/latest/linux/codecov
- chmod +x codecov
- ./codecov -t ${CODECOV_TOKEN} -R $CI_PROJECT_DIR -C $CI_COMMIT_SHA -r $CI_PROJECT_PATH
vulnerabilities:
stage: test
image: amd64/golang:1.25.4@sha256:2476911a55fb171469c5266ee3d81e180fd25592c4f74ae79488fb49578bdc96
script:
- go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./...
+4 -11
View File
@@ -10,15 +10,8 @@ repos:
args:
- --allow-multiple-documents
- 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
rev: v9.23.0
rev: v9.24.0
hooks:
- id: commitlint
stages: [ commit-msg ]
@@ -30,17 +23,17 @@ repos:
- id: go-imports
args:
- -local
- gitlab.com/unboundsoftware/shiny/presenter
- gitea.unbound.se/unboundsoftware/dbsetup
- repo: https://github.com/lietu/go-pre-commit
rev: v1.0.0
hooks:
- id: go-test
- id: gofumpt
- repo: https://github.com/golangci/golangci-lint
rev: v2.6.1
rev: v2.11.4
hooks:
- id: golangci-lint-full
- repo: https://github.com/gitleaks/gitleaks
rev: v8.29.0
rev: v8.30.1
hooks:
- id: gitleaks
+13
View File
@@ -0,0 +1,13 @@
# Coverage configuration for go-test-coverage
# https://github.com/vladopajic/go-test-coverage
profile: coverage.txt
threshold:
file: 0
package: 0
total: 0
exclude:
paths:
- _test\.go$
+3 -1
View File
@@ -1 +1,3 @@
{"version":"v0.0.3"}
{
"version": "v0.1.3"
}
+58 -1
View File
@@ -2,7 +2,64 @@
All notable changes to this project will be documented in this file.
## [0.0.3] - 2025-11-05
## [0.1.3] - 2026-03-22
### ⚙️ Miscellaneous Tasks
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.11.1 (#77)
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.11.2 (#79)
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.11.3 (#81)
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.30.1 (#83)
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.11.4 (#85)
## [0.1.2] - 2026-02-22
### 🐛 Bug Fixes
- *(deps)* Update module github.com/pressly/goose/v3 to v3.27.0
### ⚙️ Miscellaneous Tasks
- *(deps)* Update golang:1.25.5 docker digest to 3a01526 (#64)
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.24.0 (#65)
- *(deps)* Update golang docker tag to v1.25.6 (#67)
- Remove unused .gitlab-ci.yml
- Add code coverage integration
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.9.0 (#71)
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.10.1 (#72)
## [0.1.1] - 2026-01-09
### ⚙️ Miscellaneous Tasks
- *(deps)* Update actions/setup-python action to v6
- Migrate module path to gitea.unbound.se
## [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
+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: `gitea.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 `gitea.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
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)
+9 -8
View File
@@ -1,23 +1,24 @@
module gitlab.com/unboundsoftware/dbsetup
module gitea.unbound.se/unboundsoftware/dbsetup
go 1.24.4
go 1.25.0
require (
github.com/jmoiron/sqlx v1.4.0
github.com/pressly/goose/v3 v3.26.0
github.com/pressly/goose/v3 v3.27.0
github.com/uptrace/opentelemetry-go-extra/otelsqlx v0.3.2
)
require (
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/mfridman/interpolate v0.0.2 // indirect
github.com/sethvargo/go-retry v0.3.0 // indirect
github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/otel v1.37.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
go.opentelemetry.io/otel/trace v1.37.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel v1.40.0 // indirect
go.opentelemetry.io/otel/metric v1.40.0 // indirect
go.opentelemetry.io/otel/trace v1.40.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/sync v0.19.0 // indirect
)
+28 -25
View File
@@ -1,5 +1,8 @@
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo=
filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
@@ -26,45 +29,45 @@ github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY=
github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jpmM=
github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY=
github.com/pressly/goose/v3 v3.27.0 h1:/D30gVTuQhu0WsNZYbJi4DMOsx1lNq+6SkLe+Wp59BM=
github.com/pressly/goose/v3 v3.27.0/go.mod h1:3ZBeCXqzkgIRvrEMDkYh1guvtoJTU5oMMuDdkutoM78=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE=
github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas=
github.com/stretchr/testify v1.11.0 h1:ib4sjIrwZKxE5u/Japgo/7SJV3PvgjGiRNAvTVGqQl8=
github.com/stretchr/testify v1.11.0/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2 h1:ZjUj9BLYf9PEqBn8W/OapxhPjVRdC6CsXTdULHsyk5c=
github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2/go.mod h1:O8bHQfyinKwTXKkiKNGmLQS7vRsqRxIQTFZpYpHK3IQ=
github.com/uptrace/opentelemetry-go-extra/otelsqlx v0.3.2 h1:zA9ZXfdtowo0EKt+t7uqXNlHxPeygrxuFSIroiBVgPU=
github.com/uptrace/opentelemetry-go-extra/otelsqlx v0.3.2/go.mod h1:ySXmuW9JLCm/TjsQksuMY/7MNiWqfHnhH2xeT34uOLU=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I=
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms=
go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g=
go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g=
go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc=
go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw=
go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o=
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa h1:Zt3DZoOFFYkKhDT3v7Lm9FDMEV06GpzjG2jrqW+QTE0=
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa/go.mod h1:K79w1Vqn7PoiZn+TkNpx3BUWUQksGO3JcVX6qIjytmA=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
modernc.org/libc v1.66.3 h1:cfCbjTUcdsKyyZZfEUKfoHcP3S0Wkvz3jgSzByEWVCQ=
modernc.org/libc v1.66.3/go.mod h1:XD9zO8kt59cANKvHPXpx7yS2ELPheAey0vjIuZOhOU8=
modernc.org/libc v1.68.0 h1:PJ5ikFOV5pwpW+VqCK1hKJuEWsonkIJhhIXyuF/91pQ=
modernc.org/libc v1.68.0/go.mod h1:NnKCYeoYgsEqnY3PgvNgAeaJnso968ygU8Z0DxjoEc0=
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
modernc.org/sqlite v1.38.2 h1:Aclu7+tgjgcQVShZqim41Bbw9Cho0y/7WzYptXqkEek=
modernc.org/sqlite v1.38.2/go.mod h1:cPTJYSlgg3Sfg046yBShXENNtPrWrDX8bsbAQBzgQ5E=
modernc.org/sqlite v1.46.1 h1:eFJ2ShBLIEnUWlLy12raN0Z1plqmFX9Qe3rjQTKt6sU=
modernc.org/sqlite v1.46.1/go.mod h1:CzbrU2lSB1DKUusvwGz7rqEKIq+NUd8GWuBBZDs9/nA=