17 Commits
Author SHA1 Message Date
releaser dfc87b1003 chore(release): prepare for v0.2.2 (#26)
Unbound Release / Create Tag (push) Skipped
logging / coverage-baseline (push) Successful in 1m20s
Unbound Release / Check Preconditions (push) Successful in 27s
Unbound Release / Generate Changelog and Handle PR (push) Successful in 30s
logging / test (push) Skipped
logging / vulnerabilities (push) Skipped
pre-commit / pre-commit (push) Skipped
Unbound Release / Create Release (push) Successful in 31s
Release / release (push) Successful in 4m45s
## [0.2.2] - 2026-08-29

### 🐛 Bug Fixes

- *(deps)* Update module github.com/stretchr/testify to v1.12.0 (#19)
- *(deps)* Update module github.com/stretchr/testify to v1.12.1 (#21)
- *(deps)* Update module go.opentelemetry.io/contrib/bridges/otelslog to v0.20.1 (#25)

### ⚙️ Miscellaneous Tasks

- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.13.1 (#22)

<!-- generated by git-cliff -->

---

**Note:** Please use **Squash Merge** when merging this PR.

Reviewed-on: #26
Co-authored-by: Unbound Releaser <releaser@unbound.se>
2026-08-29 11:25:32 +00:00
renovate ebea445d62 fix(deps): update module go.opentelemetry.io/contrib/bridges/otelslog to v0.20.1 (#25)
Release / release (push) Successful in 1m27s
logging / coverage-baseline (push) Successful in 1m1s
Unbound Release / Check Preconditions (push) Successful in 24s
Unbound Release / Create Tag (push) Skipped
Unbound Release / Create Release (push) Successful in 29s
logging / test (push) Skipped
logging / vulnerabilities (push) Skipped
Unbound Release / Generate Changelog and Handle PR (push) Successful in 40s
pre-commit / pre-commit (push) Successful in 3m3s
2026-08-29 10:14:39 +00:00
renovate 9050ae0e61 fix(deps): update module github.com/stretchr/testify to v1.12.1 (#21)
logging / coverage-baseline (push) Successful in 49s
Unbound Release / Check Preconditions (push) Successful in 22s
Unbound Release / Create Tag (push) Skipped
logging / test (push) Skipped
logging / vulnerabilities (push) Skipped
pre-commit / pre-commit (push) Skipped
Unbound Release / Generate Changelog and Handle PR (push) Successful in 36s
Unbound Release / Create Release (push) Successful in 24s
Release / release (push) Successful in 2m36s
2026-08-21 09:09:14 +00:00
renovate 0bd1fed040 chore(deps): update pre-commit hook golangci/golangci-lint to v2.13.1 (#22)
logging / coverage-baseline (push) Successful in 1m16s
Unbound Release / Check Preconditions (push) Successful in 30s
Unbound Release / Create Tag (push) Skipped
Release / release (push) Successful in 4m54s
logging / test (push) Skipped
logging / vulnerabilities (push) Skipped
pre-commit / pre-commit (push) Skipped
Unbound Release / Generate Changelog and Handle PR (push) Successful in 36s
Unbound Release / Create Release (push) Successful in 31s
2026-08-21 08:15:22 +00:00
renovate d1fe277edf fix(deps): update module github.com/stretchr/testify to v1.12.0 (#19)
Unbound Release / Check Preconditions (push) Successful in 22s
logging / coverage-baseline (push) Successful in 51s
Unbound Release / Create Tag (push) Skipped
logging / test (push) Skipped
Unbound Release / Create Release (push) Successful in 24s
logging / vulnerabilities (push) Skipped
pre-commit / pre-commit (push) Skipped
Unbound Release / Generate Changelog and Handle PR (push) Successful in 37s
Release / release (push) Successful in 26m50s
2026-08-17 09:39:38 +00:00
releaser b78c2a98a7 chore(release): prepare for v0.2.1 (#18)
Unbound Release / Check Preconditions (push) Successful in 21s
Unbound Release / Create Tag (push) Skipped
logging / coverage-baseline (push) Successful in 1m13s
Unbound Release / Generate Changelog and Handle PR (push) Successful in 23s
logging / test (push) Skipped
logging / vulnerabilities (push) Skipped
Release / release (push) Successful in 1m37s
Unbound Release / Create Release (push) Successful in 26s
pre-commit / pre-commit (push) Successful in 2m9s
## [0.2.1] - 2026-08-07

### 🐛 Bug Fixes

- *(deps)* Update module go.opentelemetry.io/contrib/bridges/otelslog to v0.20.0 (#17)

### ⚙️ Miscellaneous Tasks

- *(deps)* Update actions/checkout action to v7 (#7)
- *(deps)* Update actions/cache action to v6 (#9)
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.26.0 (#11)
- *(deps)* Update actions/setup-go action to v7 (#13)
- *(deps)* Update actions/setup-python action to v7 (#15)

<!-- generated by git-cliff -->

---

**Note:** Please use **Squash Merge** when merging this PR.

Reviewed-on: #18
Co-authored-by: Unbound Releaser <releaser@unbound.se>
2026-08-08 07:17:13 +00:00
renovate d3da98dcd0 fix(deps): update module go.opentelemetry.io/contrib/bridges/otelslog to v0.20.0 (#17)
logging / test (push) Skipped
logging / vulnerabilities (push) Skipped
Unbound Release / Generate Changelog and Handle PR (push) Successful in 45s
Unbound Release / Check Preconditions (push) Successful in 30s
logging / coverage-baseline (push) Successful in 48s
pre-commit / pre-commit (push) Successful in 2m27s
Unbound Release / Create Release (push) Successful in 32s
Unbound Release / Create Tag (push) Skipped
Release / release (push) Successful in 1m20s
2026-08-07 17:12:54 +00:00
renovate 6a0c8c1fda chore(deps): update actions/setup-python action to v7 (#15)
logging / test (push) Skipped
logging / vulnerabilities (push) Skipped
pre-commit / pre-commit (push) Skipped
logging / coverage-baseline (push) Successful in 1m5s
Unbound Release / Check Preconditions (push) Successful in 26s
Unbound Release / Create Tag (push) Skipped
Unbound Release / Generate Changelog and Handle PR (push) Successful in 37s
Unbound Release / Create Release (push) Successful in 28s
Release / release (push) Successful in 22m34s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-python](https://github.com/actions/setup-python) | action | major | `v6` → `v7` |

---

### Release Notes

<details>
<summary>actions/setup-python (actions/setup-python)</summary>

### [`v7.0.0`](https://github.com/actions/setup-python/releases/tag/v7.0.0)

[Compare Source](https://github.com/actions/setup-python/compare/v7.0.0...v7.0.0)

#### What's Changed

##### Enhancements

- Migrate to ESM and upgrade dependencies by [@&#8203;priyagupta108](https://github.com/priyagupta108) in [#&#8203;1330](https://github.com/actions/setup-python/pull/1330)
- Pin SHA commits and update docs with latest versions by [@&#8203;HarithaVattikuti](https://github.com/HarithaVattikuti) in [#&#8203;1338](https://github.com/actions/setup-python/pull/1338)
- Remove the pip-install input by [@&#8203;gowridurgad](https://github.com/gowridurgad) in [#&#8203;1336](https://github.com/actions/setup-python/pull/1336)

##### Bug Fix

- Fix to Classify stderr warning messages as warnings instead of errors in annotations by [@&#8203;lmvysakh](https://github.com/lmvysakh) in [#&#8203;1335](https://github.com/actions/setup-python/pull/1335)
- Validate and retry manifest fetch to prevent silent failures by [@&#8203;priyagupta108](https://github.com/priyagupta108) in [#&#8203;1332](https://github.com/actions/setup-python/pull/1332)

##### Dependency Upgrade

- Bump certifi from 2020.6.20 to 2024.7.4 in /**tests**/data by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;1328](https://github.com/actions/setup-python/pull/1328)
- Remove EOL Python versions and Bumps numpy text fixture by [@&#8203;priya-kinthali](https://github.com/priya-kinthali) in [#&#8203;1333](https://github.com/actions/setup-python/pull/1333)
- Upgrade [@&#8203;actions/cache](https://github.com/actions/cache) to 6.2.0 by [@&#8203;philip-gai](https://github.com/philip-gai) in [#&#8203;1337](https://github.com/actions/setup-python/pull/1337)

#### New Contributors

- [@&#8203;lmvysakh](https://github.com/lmvysakh) made their first contribution in [#&#8203;1335](https://github.com/actions/setup-python/pull/1335)
- [@&#8203;philip-gai](https://github.com/philip-gai) made their first contribution in [#&#8203;1337](https://github.com/actions/setup-python/pull/1337)

**Full Changelog**: <https://github.com/actions/setup-python/compare/v6...v7.0.0>

### [`v7`](https://github.com/actions/setup-python/compare/v6.3.0...v7.0.0)

[Compare Source](https://github.com/actions/setup-python/compare/v6.3.0...v7.0.0)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTcuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI1Ny4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->Reviewed-on: #15

Co-authored-by: Renovate Bot <renovate@unbound.se>
2026-07-25 11:36:25 +00:00
renovate 9673396aa1 chore(deps): update actions/setup-go action to v7 (#13)
logging / test (push) Has been skipped
logging / vulnerabilities (push) Has been skipped
logging / coverage-baseline (push) Successful in 1m5s
Release / release (push) Successful in 1m16s
pre-commit / pre-commit (push) Successful in 3m57s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-go](https://github.com/actions/setup-go) | action | major | `v6` → `v7` |

---

### Release Notes

<details>
<summary>actions/setup-go (actions/setup-go)</summary>

### [`v7.0.0`](https://github.com/actions/setup-go/releases/tag/v7.0.0)

[Compare Source](https://github.com/actions/setup-go/compare/v7.0.0...v7.0.0)

##### What's Changed

- Migrate to ESM and upgrade dependencies by [@&#8203;priyagupta108](https://github.com/priyagupta108) in [#&#8203;763](https://github.com/actions/setup-go/pull/763)
- chore(deps): bump [@&#8203;actions/cache](https://github.com/actions/cache) to 6.2.0 by [@&#8203;philip-gai](https://github.com/philip-gai) in [#&#8203;771](https://github.com/actions/setup-go/pull/771)

##### New Contributors

- [@&#8203;philip-gai](https://github.com/philip-gai) made their first contribution in [#&#8203;771](https://github.com/actions/setup-go/pull/771)

**Full Changelog**: <https://github.com/actions/setup-go/compare/v6...v7.0.0>

### [`v7`](https://github.com/actions/setup-go/compare/v6.5.0...v7.0.0)

[Compare Source](https://github.com/actions/setup-go/compare/v6.5.0...v7.0.0)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDMuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI0My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: #13
Co-authored-by: Renovate Bot <renovate@unbound.se>
Co-committed-by: Renovate Bot <renovate@unbound.se>
2026-07-19 18:44:28 +00:00
renovate ec229bca0f chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.26.0 (#11)
logging / test (push) Has been skipped
logging / vulnerabilities (push) Has been skipped
logging / coverage-baseline (push) Successful in 1m54s
pre-commit / pre-commit (push) Successful in 3m26s
Release / release (push) Successful in 54s
2026-06-27 22:27:53 +00:00
renovate d866d8ebba chore(deps): update actions/cache action to v6 (#9)
logging / test (push) Has been skipped
logging / vulnerabilities (push) Has been skipped
Release / release (push) Successful in 1m0s
logging / coverage-baseline (push) Successful in 1m57s
pre-commit / pre-commit (push) Successful in 4m12s
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [actions/cache](https://github.com/actions/cache) | action | major | `v5` → `v6` | `v6.1.0` |

---

### Release Notes

<details>
<summary>actions/cache (actions/cache)</summary>

### [`v6.0.0`](https://github.com/actions/cache/releases/tag/v6.0.0)

[Compare Source](https://github.com/actions/cache/compare/v6.0.0...v6.0.0)

##### What's Changed

- Update packages, migrate to ESM by [@&#8203;Samirat](https://github.com/Samirat) in [#&#8203;1760](https://github.com/actions/cache/pull/1760)

**Full Changelog**: <https://github.com/actions/cache/compare/v5...v6.0.0>

### [`v6`](https://github.com/actions/cache/compare/v5.0.5...v6.0.0)

[Compare Source](https://github.com/actions/cache/compare/v5.0.5...v6.0.0)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzIuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIzMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: #9
Co-authored-by: Renovate Bot <renovate@unbound.se>
Co-committed-by: Renovate Bot <renovate@unbound.se>
2026-06-26 20:54:12 +00:00
renovate 7a1e18ce9d chore(deps): update actions/checkout action to v7 (#7)
Release / release (push) Successful in 1m1s
logging / test (push) Has been skipped
logging / vulnerabilities (push) Has been skipped
logging / coverage-baseline (push) Successful in 2m31s
pre-commit / pre-commit (push) Successful in 5m26s
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [actions/checkout](https://github.com/actions/checkout) | action | major | `v6` → `v7` | `v7.0.0` |

---

### Release Notes

<details>
<summary>actions/checkout (actions/checkout)</summary>

### [`v7.0.0`](https://github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v700)

[Compare Source](https://github.com/actions/checkout/compare/v7.0.0...v7.0.0)

- Block checking out fork PR for pull\_request\_target and workflow\_run by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2454](https://github.com/actions/checkout/pull/2454)
- Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2458](https://github.com/actions/checkout/pull/2458)
- Bump flatted from 3.3.1 to 3.4.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2460](https://github.com/actions/checkout/pull/2460)
- Bump js-yaml from 4.1.0 to 4.2.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2461](https://github.com/actions/checkout/pull/2461)
- Bump [@&#8203;actions/core](https://github.com/actions/core) and [@&#8203;actions/tool-cache](https://github.com/actions/tool-cache) and Remove uuid by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2459](https://github.com/actions/checkout/pull/2459)
- upgrade module to esm and update dependencies by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2463](https://github.com/actions/checkout/pull/2463)
- Bump the minor-npm-dependencies group across 1 directory with 3 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2462](https://github.com/actions/checkout/pull/2462)

### [`v7`](https://github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v700)

[Compare Source](https://github.com/actions/checkout/compare/v6.0.3...v7.0.0)

- Block checking out fork PR for pull\_request\_target and workflow\_run by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2454](https://github.com/actions/checkout/pull/2454)
- Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2458](https://github.com/actions/checkout/pull/2458)
- Bump flatted from 3.3.1 to 3.4.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2460](https://github.com/actions/checkout/pull/2460)
- Bump js-yaml from 4.1.0 to 4.2.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2461](https://github.com/actions/checkout/pull/2461)
- Bump [@&#8203;actions/core](https://github.com/actions/core) and [@&#8203;actions/tool-cache](https://github.com/actions/tool-cache) and Remove uuid by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2459](https://github.com/actions/checkout/pull/2459)
- upgrade module to esm and update dependencies by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2463](https://github.com/actions/checkout/pull/2463)
- Bump the minor-npm-dependencies group across 1 directory with 3 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2462](https://github.com/actions/checkout/pull/2462)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIyMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: #7
Co-authored-by: Renovate Bot <renovate@unbound.se>
Co-committed-by: Renovate Bot <renovate@unbound.se>
2026-06-20 19:04:08 +00:00
releaser 852056615e chore(release): prepare for v0.2.0 (#6)
logging / test (push) Has been skipped
logging / vulnerabilities (push) Has been skipped
Release / release (push) Successful in 46s
logging / coverage-baseline (push) Successful in 2m47s
pre-commit / pre-commit (push) Successful in 6m32s
Co-authored-by: Unbound Releaser <releaser@unbound.se>
Co-committed-by: Unbound Releaser <releaser@unbound.se>
2026-06-19 17:05:39 +00:00
argoyle a705fc33c4 feat: move MockLogger into a logtest sub-package (#5)
logging / test (push) Has been skipped
logging / vulnerabilities (push) Has been skipped
Release / release (push) Successful in 56s
logging / coverage-baseline (push) Successful in 2m49s
pre-commit / pre-commit (push) Successful in 5m29s
2026-06-19 16:43:26 +00:00
argoyle e067a72887 chore(ci): add shared-lib scaffolding and functional coverage gate (#3)
logging / test (push) Has been skipped
logging / vulnerabilities (push) Has been skipped
Release / release (push) Successful in 59s
logging / coverage-baseline (push) Successful in 2m41s
pre-commit / pre-commit (push) Successful in 5m51s
2026-06-15 17:53:42 +00:00
argoyle 35f439eff5 Merge pull request 'chore: Configure Renovate' (#1) from renovate/configure into main
logging / test (push) Has been skipped
logging / vulnerabilities (push) Has been skipped
Reviewed-on: #1
2026-06-15 12:08:47 +00:00
renovate 8e3cebc6e8 Add renovate.json
logging / vulnerabilities (pull_request) Successful in 1m33s
logging / test (pull_request) Successful in 1m48s
2026-06-15 10:07:07 +00:00
18 changed files with 440 additions and 53 deletions
+11
View File
@@ -0,0 +1,11 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
[*.go]
indent_style = tab
indent_size = 2
+77 -5
View File
@@ -11,8 +11,8 @@ jobs:
if: gitea.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: 'stable'
- name: Format check
@@ -20,13 +20,85 @@ jobs:
go install mvdan.cc/gofumpt@latest
test -z "$(gofumpt -l .)"
- name: Run tests
run: go test -race ./...
run: go test -race -coverprofile=coverage.txt ./...
- name: Filter test files from coverage
run: |
grep -v -E '_test\.go:' coverage.txt > coverage.filtered.txt || true
mv coverage.filtered.txt coverage.txt
- name: Check coverage
id: coverage
run: |
go install github.com/vladopajic/go-test-coverage/v2@latest
go-test-coverage --config ./.testcoverage.yml --github-action-output
- name: Restore baseline coverage
uses: actions/cache/restore@v6
with:
path: coverage-baseline.txt
key: coverage-baseline-${{ gitea.run_id }}
restore-keys: |
coverage-baseline-
- name: Compare coverage
run: |
CURRENT="${{ steps.coverage.outputs.total-coverage }}"
if [ -f coverage-baseline.txt ]; then
BASE=$(cat coverage-baseline.txt)
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 yet, skipping comparison"
echo "Current coverage: ${CURRENT}%"
fi
- name: Post coverage comment
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_URL: ${{ gitea.server_url }}
run: |
COVERAGE="${{ steps.coverage.outputs.total-coverage }}"
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}%**\"}"
coverage-baseline:
# Records main's coverage into the Actions cache for the next PR's
# regression gate to read. Post-merge only, not a required check, blocks
# nothing (cf. ADR-0010).
if: gitea.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: 'stable'
- name: Compute coverage
id: coverage
run: |
go install github.com/vladopajic/go-test-coverage/v2@latest
go test -coverprofile=coverage.txt ./...
grep -v -E '_test\.go:' coverage.txt > coverage.filtered.txt || true
mv coverage.filtered.txt coverage.txt
go-test-coverage --config ./.testcoverage.yml --github-action-output
- name: Write baseline file
run: echo "${{ steps.coverage.outputs.total-coverage }}" > coverage-baseline.txt
- name: Save baseline to cache
uses: actions/cache/save@v6
with:
path: coverage-baseline.txt
key: coverage-baseline-${{ gitea.run_id }}
vulnerabilities:
if: gitea.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: 'stable'
- name: Check vulnerabilities
+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@v7
- uses: actions/setup-go@v7
with:
go-version: stable
- uses: actions/setup-python@v7
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
+9
View File
@@ -0,0 +1,9 @@
name: Release
on:
push:
branches: [main]
jobs:
release:
uses: unboundsoftware/shared-workflows/.gitea/workflows/Release.yml@main
+1
View File
@@ -2,3 +2,4 @@
.claude
/release
coverage.txt
coverage-baseline.txt
+22
View File
@@ -0,0 +1,22 @@
version: "2"
run:
allow-parallel-runners: true
linters:
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
+39
View File
@@ -0,0 +1,39 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args:
- --allow-multiple-documents
- id: check-added-large-files
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.26.0
hooks:
- id: commitlint
stages: [ commit-msg ]
additional_dependencies: [ '@commitlint/config-conventional' ]
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-mod-tidy
- id: go-imports
args:
- -local
- gitea.unbound.se/shiny/logging
- 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.13.1
hooks:
- id: golangci-lint-full
- repo: https://github.com/gitleaks/gitleaks
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
View File
@@ -0,0 +1,3 @@
{
"version": "v0.2.2"
}
+47
View File
@@ -0,0 +1,47 @@
# Changelog
All notable changes to this project will be documented in this file.
## [0.2.2] - 2026-08-29
### 🐛 Bug Fixes
- *(deps)* Update module github.com/stretchr/testify to v1.12.0 (#19)
- *(deps)* Update module github.com/stretchr/testify to v1.12.1 (#21)
- *(deps)* Update module go.opentelemetry.io/contrib/bridges/otelslog to v0.20.1 (#25)
### ⚙️ Miscellaneous Tasks
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.13.1 (#22)
## [0.2.1] - 2026-08-08
### 🐛 Bug Fixes
- *(deps)* Update module go.opentelemetry.io/contrib/bridges/otelslog to v0.20.0 (#17)
### ⚙️ Miscellaneous Tasks
- *(deps)* Update actions/checkout action to v7 (#7)
- *(deps)* Update actions/cache action to v6 (#9)
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.26.0 (#11)
- *(deps)* Update actions/setup-go action to v7 (#13)
- *(deps)* Update actions/setup-python action to v7 (#15)
## [0.2.0] - 2026-06-19
### 🚀 Features
- Move MockLogger into a logtest sub-package (#5)
### ⚙️ Miscellaneous Tasks
- *(ci)* Add shared-lib scaffolding and functional coverage gate (#3)
## [0.1.0] - 2026-06-15
### 🚀 Features
- Initial shared logging module
<!-- generated by git-cliff -->
+68
View File
@@ -0,0 +1,68 @@
# logging
Shared Go library with logging primitives for all Shiny backend services.
## Shared Documentation
@../docs/claude/architecture.md
@../docs/claude/go-services.md
@../docs/claude/conventions.md
## Library Information
### Purpose
Single home for the `slog` setup, context-logger helpers, request-logging
middleware and the `MockLogger` test helper that were previously copied (with
drift) into every backend service.
### Usage
```go
import (
"gitea.unbound.se/shiny/logging"
logmw "gitea.unbound.se/shiny/logging/middleware"
)
// Configure the slog default logger (format: text | json | otel).
logger := logging.SetupLogger(cli.LogLevel, cli.LogFormat, serviceName, buildVersion)
// Carry a logger on the request context.
ctx = logging.ContextWithLogger(ctx, logger)
logger = logging.LoggerFromContext(ctx)
// Debug-log request/response bodies.
handler = logmw.RequestLogger(logger)(handler)
```
In tests:
```go
import logtest "gitea.unbound.se/shiny/logging/logtest"
m := logtest.NewMockLogger()
// ... exercise code with m.Logger() ...
m.Check(t, []string{"level=INFO msg=\"...\""})
```
### Exported API
- `SetupLogger(logLevel, logFormat, serviceName, buildVersion string) *slog.Logger`
- `ContextWithLogger(ctx, *slog.Logger) context.Context` / `LoggerFromContext(ctx) *slog.Logger`
- `logging/logtest.NewMockLogger() *MockLogger` (+ `MockLogger.Logger()`, `MockLogger.Check(t, want)`) — the test helper, in its own sub-package so production code doesn't pull in testify.
- `logging/middleware.RequestLogger(logger) func(http.Handler) http.Handler`.
### Notes
- `MockLogger`/`NewMockLogger` live in the `logging/logtest` sub-package, so the
production `logging` package's import graph is free of `testify` — consumers
only compile it if they import `logtest`. (`testify` stays in the module's
`go.mod` because `logtest` and the library's own tests use it.)
### Conventions
Standard Shiny library scaffolding: `gofumpt`/`goimports -local`, golangci-lint,
gitleaks and conventional-commit checks via pre-commit; coverage-regression gate
in CI (`.testcoverage.yml`); releases auto-tagged from conventional commits by
the shared Release workflow. Bump the consuming services' `go.mod` after a
release.
+80
View File
@@ -0,0 +1,80 @@
# git-cliff ~ default configuration file
# https://git-cliff.org/docs/configuration
#
# Lines starting with "#" are comments.
# Configuration options are organized into tables and keys.
# See documentation for more information on available options.
[changelog]
# template for the changelog header
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing s
trim = true
# postprocessors
postprocessors = [
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
]
# render body even when there are no releases to process
# render_always = true
# output file path
# output = "test.md"
[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
# Replace issue numbers
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
# Check spelling of the commit with https://github.com/crate-ci/typos
# If the spelling is incorrect, it will be automatically fixed.
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
]
# filter out the commits that are not matched by commit parsers
filter_commits = false
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
+8 -10
View File
@@ -3,20 +3,18 @@ module gitea.unbound.se/shiny/logging
go 1.25.0
require (
github.com/stretchr/testify v1.11.1
go.opentelemetry.io/contrib/bridges/otelslog v0.19.0
github.com/stretchr/testify v1.12.1
go.opentelemetry.io/contrib/bridges/otelslog v0.20.1
)
require (
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/logr v1.4.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel v1.44.0 // indirect
go.opentelemetry.io/otel/log v0.20.0 // indirect
go.opentelemetry.io/otel/metric v1.44.0 // indirect
go.opentelemetry.io/otel/trace v1.44.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
go.opentelemetry.io/otel v1.46.0 // indirect
go.opentelemetry.io/otel/log v0.22.0 // indirect
go.opentelemetry.io/otel/metric v1.46.0 // indirect
go.opentelemetry.io/otel/trace v1.46.0 // indirect
go.yaml.in/yaml/v3 v3.0.5 // indirect
)
+16 -29
View File
@@ -1,38 +1,25 @@
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/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8=
github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
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/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
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/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE=
github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg=
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/contrib/bridges/otelslog v0.19.0 h1:5RgvxieNq9tS3ewrV1vnODvbHPfKUIJcYtF9Cvz+6aQ=
go.opentelemetry.io/contrib/bridges/otelslog v0.19.0/go.mod h1:iTBIdNwx/xmUhfgJs6+84S4dIK059811cO1eUBjKcHY=
go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU=
go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc=
go.opentelemetry.io/otel/log v0.20.0 h1:/5i0vuHxCLWUfChWG41K9wkM0jafruPw9NU1/RCJirs=
go.opentelemetry.io/otel/log v0.20.0/go.mod h1:wOcMcjsZpG8x7Bak7IhSi/lg8wscV2C1VdrKCLPlt0E=
go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc=
go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo=
go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk=
go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
go.opentelemetry.io/contrib/bridges/otelslog v0.20.1 h1:5sHc4ToTFjfSZCtGAAM6jPunICAmJX73htv372T4ipc=
go.opentelemetry.io/contrib/bridges/otelslog v0.20.1/go.mod h1:oa6kgvyz/3GYW04dohd0++xJIH4xdQY8PAbpeCMaM8M=
go.opentelemetry.io/otel v1.46.0 h1:FHt5/CDyVxi/8IM1CH7VE/rRgq3kLHa2mSTVMO8AWyc=
go.opentelemetry.io/otel v1.46.0/go.mod h1:Gj3SEScelsNC45tp4nSxRYlS+f5iez7W8XPMCt905kE=
go.opentelemetry.io/otel/log v0.22.0 h1:5DBNnfvaJ6CVdkJ+Jle8Tzs50aSSv49TXGj9XRsEYw0=
go.opentelemetry.io/otel/log v0.22.0/go.mod h1:gzOt/R67vF2GniAqWu8Qv0SXy89f71muHcrkz76PCdc=
go.opentelemetry.io/otel/metric v1.46.0 h1:yBnkXvgV7AXFILZc5K6IZe/CBFF3OS7BJ8ov6/lj0K8=
go.opentelemetry.io/otel/metric v1.46.0/go.mod h1:iPmdWqifKUdzziPkvvzIJXITl56fQx2mGM/DHLB3/2o=
go.opentelemetry.io/otel/trace v1.46.0 h1:OULy7ccdJnZtJ0UDYFOIGaCmiWzJ8Vi2G/Rsu60qs1c=
go.opentelemetry.io/otel/trace v1.46.0/go.mod h1:J7GAXweO77XSFkB/rmAqk9D6ihszhFjLU+d9WuUxDLI=
go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
-8
View File
@@ -23,11 +23,3 @@ func TestContextLogger(t *testing.T) {
ctx := ContextWithLogger(context.Background(), custom)
assert.Same(t, custom, LoggerFromContext(ctx))
}
func TestMockLogger(t *testing.T) {
m := NewMockLogger()
m.Logger().Info("hello", "k", "v")
m.Check(t, []string{`level=INFO msg=hello k=v`})
empty := NewMockLogger()
empty.Check(t, nil)
}
+4 -1
View File
@@ -1,4 +1,7 @@
package logging
// Package logtest provides test helpers for the logging library. It is kept in
// its own package so that importing the production logging package does not pull
// in testify (a test-only dependency) — only consumers that import logtest do.
package logtest
import (
"bytes"
+11
View File
@@ -0,0 +1,11 @@
package logtest
import "testing"
func TestMockLogger(t *testing.T) {
m := NewMockLogger()
m.Logger().Info("hello", "k", "v")
m.Check(t, []string{`level=INFO msg=hello k=v`})
empty := NewMockLogger()
empty.Check(t, nil)
}
+6
View File
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
}