5 Commits

Author SHA1 Message Date
releaser de0855e22b chore(release): prepare for v0.2.7 2026-05-03 15:57:58 +00:00
releaser 899142a76b chore(release): prepare for v0.2.7 2026-05-03 15:57:54 +00:00
renovate 4bbd8b3e63 chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.25.0 (#136)
Release / release (push) Failing after 49s
otelsetup / vulnerabilities (push) Successful in 1m44s
otelsetup / test (push) Successful in 2m36s
pre-commit / pre-commit (push) Successful in 6m12s
2026-05-03 15:43:30 +00:00
renovate ec0ea2a287 fix(deps): update module github.com/99designs/gqlgen to v0.17.90 (#133)
otelsetup / vulnerabilities (push) Successful in 2m18s
otelsetup / test (push) Successful in 3m18s
Release / release (push) Successful in 1m2s
pre-commit / pre-commit (push) Successful in 6m15s
2026-04-29 06:18:29 +00:00
argoyle dc4bc4a98c fix(ci): use go-test-coverage binary directly to fix Gitea Actions (#134)
Release / release (push) Failing after 1m4s
otelsetup / vulnerabilities (push) Successful in 2m13s
otelsetup / test (push) Successful in 3m21s
pre-commit / pre-commit (push) Successful in 6m28s
## Summary

- `vladopajic/go-test-coverage@v2` (v2.18.5+, released 2026-04-26/27) restructured its composite action to pass inputs via env-var mapping. Gitea `act_runner` doesn't expand `${{ }}` expressions inside docker-action `env:` blocks reliably, so the literal string `${{ inputs.config }}` reached the binary and broke the 'Check coverage' step.
- Replace the action with a direct `go install` + binary invocation (matching the established Frostmoln pattern).
- Use `--github-action-output` to expose `total-coverage` as a step output, replacing the manual `go tool cover -func | grep | awk` calculations.
- Baseline artifact now stores the percentage directly instead of the full coverage profile.

## Test plan

- [x] `prek run --all-files` passes
- [ ] CI passes on this PR
- [ ] After merge, baseline artifact format propagates on next push to main

Reviewed-on: #134
2026-04-29 05:44:15 +00:00
4 changed files with 26 additions and 18 deletions
+11 -15
View File
@@ -18,11 +18,10 @@ jobs:
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)
id: coverage
run: |
go install github.com/vladopajic/go-test-coverage/v2@latest
go-test-coverage --config ./.testcoverage.yml --github-action-output
- name: Download baseline coverage
if: gitea.event_name == 'pull_request'
uses: actions/download-artifact@v3
@@ -30,14 +29,12 @@ jobs:
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 '%')
CURRENT="${{ steps.coverage.outputs.total-coverage }}"
if [ -f ./baseline/coverage.txt ]; then
BASE=$(go tool cover -func=./baseline/coverage.txt | grep "^total:" | awk '{print $NF}' | tr -d '%')
BASE=$(cat ./baseline/coverage.txt)
echo "Base coverage: ${BASE}%"
echo "Current coverage: ${CURRENT}%"
if [ "$(echo "$CURRENT < $BASE" | bc -l)" -eq 1 ]; then
@@ -49,8 +46,9 @@ jobs:
echo "No baseline coverage found, skipping comparison"
echo "Current coverage: ${CURRENT}%"
fi
# Upload coverage as baseline (only on main)
- name: Save coverage baseline
if: gitea.ref == 'refs/heads/main'
run: echo "${{ steps.coverage.outputs.total-coverage }}" > coverage.txt
- name: Upload coverage baseline
if: gitea.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
@@ -58,19 +56,17 @@ jobs:
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}')
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}**\"}"
-d "{\"body\": \"## Coverage Report\n\nTotal coverage: **${COVERAGE}%**\"}"
vulnerabilities:
runs-on: ubuntu-latest
+1 -1
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.24.0
rev: v9.25.0
hooks:
- id: commitlint
stages: [ commit-msg ]
+1 -1
View File
@@ -1,3 +1,3 @@
{
"version": "v0.2.6"
"version": "v0.2.7"
}
+13 -1
View File
@@ -2,7 +2,19 @@
All notable changes to this project will be documented in this file.
## [0.2.6] - 2026-03-24
## [0.2.7] - 2026-05-03
### 🐛 Bug Fixes
- *(deps)* Update opentelemetry-go monorepo (#131)
- *(ci)* Use go-test-coverage binary directly to fix Gitea Actions (#134)
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.90 (#133)
### ⚙️ Miscellaneous Tasks
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.25.0 (#136)
## [0.2.6] - 2026-04-02
### 🐛 Bug Fixes