10 Commits

Author SHA1 Message Date
renovate 7be94f8628 chore(deps): update pre-commit hook golangci/golangci-lint to v2.11.4 (#93)
pagination / vulnerabilities (push) Successful in 1m45s
pagination / test (push) Successful in 2m54s
Release / release (push) Successful in 56s
pre-commit / pre-commit (push) Successful in 6m27s
2026-03-22 19:23:59 +00:00
renovate e2c8734975 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.30.1 (#91)
Release / release (push) Successful in 1m6s
pagination / vulnerabilities (push) Successful in 2m7s
pagination / test (push) Successful in 3m7s
pre-commit / pre-commit (push) Successful in 7m43s
2026-03-12 16:24:39 +00:00
renovate 2e9eae73d2 chore(deps): update pre-commit hook golangci/golangci-lint to v2.11.3 (#89)
Release / release (push) Successful in 1m31s
pagination / vulnerabilities (push) Successful in 2m26s
pagination / test (push) Successful in 3m35s
pre-commit / pre-commit (push) Successful in 7m35s
2026-03-10 11:22:32 +00:00
renovate d53db1d334 chore(deps): update pre-commit hook golangci/golangci-lint to v2.11.2 (#87)
Release / release (push) Successful in 51s
pagination / vulnerabilities (push) Successful in 1m16s
pagination / test (push) Successful in 1m44s
pre-commit / pre-commit (push) Successful in 4m7s
2026-03-07 22:42:56 +00:00
renovate eb7eaae42b chore(deps): update pre-commit hook golangci/golangci-lint to v2.11.1 (#85)
pagination / vulnerabilities (push) Successful in 1m35s
pagination / test (push) Successful in 2m30s
Release / release (push) Successful in 1m15s
pre-commit / pre-commit (push) Successful in 8m6s
2026-03-06 16:09:16 +00:00
renovate c4e665ebc7 chore(deps): update pre-commit hook golangci/golangci-lint to v2.10.1 (#82)
pagination / vulnerabilities (push) Successful in 1m45s
pagination / test (push) Successful in 6m42s
Release / release (push) Successful in 3m30s
pre-commit / pre-commit (push) Successful in 12m48s
2026-02-17 17:34:59 +00:00
renovate 6325a514b6 chore(deps): update pre-commit hook golangci/golangci-lint to v2.9.0 (#81)
Release / release (push) Failing after 2m4s
pagination / test (push) Successful in 4m16s
pagination / vulnerabilities (push) Successful in 6m30s
pre-commit / pre-commit (push) Successful in 9m13s
2026-02-11 13:24:05 +00:00
argoyle ba1fe9694e Merge pull request 'ci: add code coverage integration' (#79) from ci-coverage-integration into main
pagination / test (push) Successful in 5m26s
Release / release (push) Successful in 4m48s
pagination / vulnerabilities (push) Successful in 7m51s
pre-commit / pre-commit (push) Successful in 14m30s
Reviewed-on: #79
2026-01-28 12:38:05 +00:00
argoyle 768dbed8f3 ci: add code coverage integration
pagination / test (pull_request) Successful in 6m26s
pagination / vulnerabilities (pull_request) Successful in 6m27s
pre-commit / pre-commit (pull_request) Successful in 11m3s
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:30 +01:00
renovate 8f09b252f5 chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.24.0 (#77)
pagination / vulnerabilities (push) Successful in 56s
Release / release (push) Successful in 1m3s
pagination / test (push) Successful in 1m32s
pre-commit / pre-commit (push) Successful in 7m11s
2026-01-14 06:28:05 +00:00
3 changed files with 71 additions and 3 deletions
+55
View File
@@ -17,6 +17,61 @@ jobs:
- name: Run tests - name: Run tests
run: go test -race -coverprofile=coverage.txt ./... 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: vulnerabilities:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
+3 -3
View File
@@ -11,7 +11,7 @@ repos:
- --allow-multiple-documents - --allow-multiple-documents
- id: check-added-large-files - id: check-added-large-files
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.23.0 rev: v9.24.0
hooks: hooks:
- id: commitlint - id: commitlint
stages: [ commit-msg ] stages: [ commit-msg ]
@@ -30,10 +30,10 @@ repos:
- 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.8.0 rev: v2.11.4
hooks: hooks:
- id: golangci-lint-full - id: golangci-lint-full
- repo: https://github.com/gitleaks/gitleaks - repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0 rev: v8.30.1
hooks: hooks:
- id: gitleaks - 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$