Compare commits
4 Commits
v0.3.4
...
next-release
| Author | SHA1 | Date | |
|---|---|---|---|
| fc6929deb9 | |||
| 41eb4391b1 | |||
| 3d29d4849a | |||
| ab5b2e6fe4 |
+11
-15
@@ -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
|
||||
|
||||
+8
-1
@@ -2,7 +2,14 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [0.3.4] - 2026-03-24
|
||||
## [0.3.5] - 2026-04-29
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
- *(ci)* Use go-test-coverage binary directly to fix Gitea Actions (#150)
|
||||
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.90 (#149)
|
||||
|
||||
## [0.3.4] - 2026-04-02
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ module gitea.unbound.se/shiny/presenter
|
||||
go 1.25.0
|
||||
|
||||
require (
|
||||
github.com/99designs/gqlgen v0.17.89
|
||||
github.com/99designs/gqlgen v0.17.90
|
||||
github.com/stretchr/testify v1.11.1
|
||||
github.com/vektah/gqlparser/v2 v2.5.32
|
||||
github.com/vektah/gqlparser/v2 v2.5.33
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
github.com/99designs/gqlgen v0.17.89 h1:KzEcxPiMgQoMw3m/E85atUEHyZyt0PbAflMia5Kw8z8=
|
||||
github.com/99designs/gqlgen v0.17.89/go.mod h1:GFqruTVGB7ZTdrf1uzOagpXbY7DrEt1pIxnTdhIbWvQ=
|
||||
github.com/99designs/gqlgen v0.17.90 h1:wSv6blm/PoplU6QoNw83EcQpNtC0HX3/+44vITJOzpk=
|
||||
github.com/99designs/gqlgen v0.17.90/go.mod h1:GqYrEwYsqCG8VaOsq2kJUCUKwAE1T+u2i+Nj7NtXiVI=
|
||||
github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM=
|
||||
github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU=
|
||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
|
||||
@@ -16,8 +16,8 @@ github.com/sosodev/duration v1.4.0 h1:35ed0KiVFriGHHzZZJaZLgmTEEICIyt8Sx0RQfj9Ij
|
||||
github.com/sosodev/duration v1.4.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg=
|
||||
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/vektah/gqlparser/v2 v2.5.32 h1:k9QPJd4sEDTL+qB4ncPLflqTJ3MmjB9SrVzJrawpFSc=
|
||||
github.com/vektah/gqlparser/v2 v2.5.32/go.mod h1:c1I28gSOVNzlfc4WuDlqU7voQnsqI6OG2amkBAFmgts=
|
||||
github.com/vektah/gqlparser/v2 v2.5.33 h1:lRp8aIeNUNbimf/axZd7ETg24q06hBtPaas+TcvI/7E=
|
||||
github.com/vektah/gqlparser/v2 v2.5.33/go.mod h1:c1I28gSOVNzlfc4WuDlqU7voQnsqI6OG2amkBAFmgts=
|
||||
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
||||
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
|
||||
Reference in New Issue
Block a user