15 Commits

Author SHA1 Message Date
argoyle f3166426b6 Merge pull request 'ci: add code coverage integration' (#277) from ci-coverage-integration into main
Release / release (push) Failing after 4m57s
authz_client / vulnerabilities (push) Successful in 7m21s
authz_client / test (push) Successful in 8m12s
pre-commit / pre-commit (push) Successful in 14m37s
Reviewed-on: #277
2026-01-28 12:38:20 +00:00
argoyle 3171c53393 ci: add code coverage integration
authz_client / test (pull_request) Successful in 6m57s
authz_client / vulnerabilities (pull_request) Successful in 7m26s
pre-commit / pre-commit (pull_request) Successful in 12m3s
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 7af8e00b4c Merge pull request 'chore: remove GitLab CI configuration' (#276) from remove-gitlab-ci into main
Release / release (push) Failing after 1m59s
authz_client / test (push) Successful in 2m49s
pre-commit / pre-commit (push) Successful in 7m12s
authz_client / vulnerabilities (push) Successful in 10m29s
Reviewed-on: #276
2026-01-18 20:15:35 +00:00
argoyle 0c0f321b33 chore: remove GitLab CI configuration
authz_client / test (pull_request) Successful in 6m42s
authz_client / vulnerabilities (pull_request) Successful in 9m50s
pre-commit / pre-commit (pull_request) Successful in 18m32s
2026-01-18 20:36:13 +01:00
renovate 87805f1552 chore(deps): update golang docker tag to v1.25.6 (#275)
authz_client / vulnerabilities (push) Successful in 1m28s
authz_client / test (push) Successful in 2m27s
Release / release (push) Successful in 2m49s
pre-commit / pre-commit (push) Successful in 5m23s
2026-01-15 22:06:58 +00:00
renovate 74ee30bccc chore(deps): update dependency go to v1.25.6 (#274)
Release / release (push) Successful in 2m33s
authz_client / test (push) Successful in 4m27s
authz_client / vulnerabilities (push) Successful in 6m55s
pre-commit / pre-commit (push) Successful in 15m1s
2026-01-15 20:06:38 +00:00
renovate 646e4f31c4 chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.24.0 (#273)
Release / release (push) Successful in 2m12s
authz_client / test (push) Successful in 5m48s
authz_client / vulnerabilities (push) Successful in 6m17s
pre-commit / pre-commit (push) Successful in 17m3s
2026-01-13 21:08:37 +00:00
renovate 881fac379f chore(deps): update golang:1.25.5 docker digest to 3a01526 (#271)
authz_client / test (push) Successful in 2m23s
authz_client / vulnerabilities (push) Successful in 2m32s
Release / release (push) Successful in 1m57s
pre-commit / pre-commit (push) Successful in 6m25s
2026-01-13 14:35:12 +00:00
argoyle 2c2bd2798f Merge pull request 'chore(release): prepare for v0.4.1' (#270) from next-release into main
Release / release (push) Successful in 48s
authz_client / test (push) Successful in 1m42s
authz_client / vulnerabilities (push) Successful in 1m41s
pre-commit / pre-commit (push) Successful in 4m20s
Reviewed-on: #270
2026-01-09 14:05:17 +00:00
releaser 204b108ece chore(release): prepare for v0.4.1
authz_client / test (pull_request) Successful in 3m27s
authz_client / vulnerabilities (pull_request) Successful in 3m36s
pre-commit / pre-commit (pull_request) Successful in 5m37s
2026-01-09 13:57:10 +00:00
releaser fa795a58cf chore(release): prepare for v0.4.1 2026-01-09 13:57:03 +00:00
argoyle 60650b9c04 Merge pull request 'chore: migrate module path to gitea.unbound.se' (#269) from migrate-to-gitea into main
authz_client / test (push) Successful in 4m45s
authz_client / vulnerabilities (push) Successful in 4m55s
Release / release (push) Successful in 4m58s
pre-commit / pre-commit (push) Has been cancelled
Reviewed-on: #269
2026-01-09 13:50:03 +00:00
argoyle 60d9eea9c9 chore: migrate module path to gitea.unbound.se
authz_client / test (pull_request) Successful in 1m56s
authz_client / vulnerabilities (pull_request) Successful in 2m31s
pre-commit / pre-commit (pull_request) Successful in 5m21s
Update module path from git.unbound.se to gitea.unbound.se for Go module
discovery over HTTPS.
2026-01-09 14:30:26 +01:00
argoyle dd571f8d85 Merge pull request 'chore(deps): update actions/setup-python action to v6' (#268) from renovate/actions-setup-python-6.x into main
authz_client / vulnerabilities (push) Successful in 3m7s
authz_client / test (push) Successful in 3m36s
pre-commit / pre-commit (push) Successful in 5m22s
Reviewed-on: #268
2026-01-09 09:28:58 +00:00
renovate 1f822b2957 chore(deps): update actions/setup-python action to v6
authz_client / test (pull_request) Successful in 5m50s
authz_client / vulnerabilities (pull_request) Successful in 5m33s
pre-commit / pre-commit (pull_request) Successful in 9m6s
2026-01-09 09:01:53 +00:00
9 changed files with 82 additions and 45 deletions
+55
View File
@@ -17,6 +17,61 @@ jobs:
- 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:
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
- uses: actions/setup-go@v6
with:
go-version: stable
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Install goimports
-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.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
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.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
script:
- go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./...
+2 -2
View File
@@ -11,7 +11,7 @@ repos:
- --allow-multiple-documents
- id: check-added-large-files
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.23.0
rev: v9.24.0
hooks:
- id: commitlint
stages: [ commit-msg ]
@@ -23,7 +23,7 @@ repos:
- id: go-imports
args:
- -local
- git.unbound.se/shiny/authz_client
- gitea.unbound.se/shiny/authz_client
- repo: https://github.com/lietu/go-pre-commit
rev: v1.0.0
hooks:
+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$
+1 -1
View File
@@ -1,3 +1,3 @@
{
"version": "v0.4.0"
"version": "v0.4.1"
}
+7
View File
@@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file.
## [0.4.1] - 2026-01-09
### ⚙️ Miscellaneous Tasks
- *(deps)* Update actions/setup-python action to v6
- Migrate module path to gitea.unbound.se
## [0.4.0] - 2026-01-09
### 🚀 Features
+1 -1
View File
@@ -17,7 +17,7 @@ Provides a client for the authz-service, handling privilege management for users
### Usage
```go
import client "git.unbound.se/shiny/authz_client"
import client "gitea.unbound.se/shiny/authz_client"
// Create handler with options
handler := client.New(client.WithBaseURL("http://authz-service"))
+2 -2
View File
@@ -1,8 +1,8 @@
module git.unbound.se/shiny/authz_client
module gitea.unbound.se/shiny/authz_client
go 1.22.12
toolchain go1.25.5
toolchain go1.25.6
require (
github.com/sparetimecoders/goamqp v0.3.3