Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f87310600f | ||
|
|
be36636a41 | ||
|
|
f6992c768e | ||
|
|
cae21ca3b3 | ||
|
|
fac6c2fcc0 | ||
|
|
da6ea54c96 | ||
|
|
a8ed507198 | ||
|
|
a13e71e828 | ||
|
|
cdca9d7a2d | ||
|
|
f2b1a4bbb1 | ||
|
|
72533b8f32 | ||
|
|
e7f6bcefa8 | ||
|
|
dca2d154c4 | ||
|
|
e1de7d9255 | ||
|
|
ffd0257f19 |
@@ -11,37 +11,24 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: docker
|
runs-on: golang
|
||||||
container:
|
container:
|
||||||
image: golang:1.25
|
image: golang:1.26
|
||||||
env:
|
env:
|
||||||
GOPRIVATE: forgejo.riotpiao.com
|
GOPRIVATE: forgejo.riotpiao.com
|
||||||
GOFLAGS: -mod=readonly
|
GOFLAGS: -mod=readonly
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
REGISTRY_PAT: ${{ secrets.REGISTRY_PAT }}
|
||||||
steps:
|
steps:
|
||||||
# actions/checkout is a Node-based action; golang:1.25 has no node on PATH.
|
# actions/checkout is a Node-based action; install node for Actions support.
|
||||||
- name: install node (required by JS-based actions)
|
- name: install node (required by JS-based actions)
|
||||||
run: apt-get update && apt-get install -y --no-install-recommends nodejs ca-certificates git
|
run: apt-get update && apt-get install -y --no-install-recommends nodejs ca-certificates git
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# kmsvc-proto lives in another private repo on the same Forgejo instance.
|
# kmsvc-proto lives in another private repo on the same Forgejo instance.
|
||||||
# GITHUB_TOKEN is auto-injected by Forgejo Actions and has read access to all repos.
|
|
||||||
- name: configure git auth for private module fetch
|
- name: configure git auth for private module fetch
|
||||||
run: |
|
run: |
|
||||||
git config --global url."https://oauth2:${GITHUB_TOKEN}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com"
|
git config --global url."https://oauth2:${REGISTRY_PAT}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com"
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: cache go modules + build cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cache/go-build
|
|
||||||
~/go/pkg/mod
|
|
||||||
key: go-${{ runner.os }}-${{ hashFiles('go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
go-${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: gofmt
|
- name: gofmt
|
||||||
run: |
|
run: |
|
||||||
@@ -63,9 +50,3 @@ jobs:
|
|||||||
|
|
||||||
- name: coverage summary
|
- name: coverage summary
|
||||||
run: go tool cover -func=coverage.out | tail -1
|
run: go tool cover -func=coverage.out | tail -1
|
||||||
|
|
||||||
- name: upload coverage
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: coverage
|
|
||||||
path: coverage.out
|
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: docker
|
runs-on: golang
|
||||||
container:
|
container:
|
||||||
image: golang:1.25
|
image: golang:1.26
|
||||||
env:
|
env:
|
||||||
GOPRIVATE: forgejo.riotpiao.com
|
GOPRIVATE: forgejo.riotpiao.com
|
||||||
steps:
|
steps:
|
||||||
@@ -23,9 +23,9 @@ jobs:
|
|||||||
|
|
||||||
- name: configure git auth for private module fetch
|
- name: configure git auth for private module fetch
|
||||||
run: |
|
run: |
|
||||||
git config --global url."https://oauth2:${GITHUB_TOKEN}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com"
|
git config --global url."https://oauth2:${REGISTRY_PAT}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com"
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
REGISTRY_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# A tag is the public contract for `go get [email protected]` — re-run the full
|
# A tag is the public contract for `go get [email protected]` — re-run the full
|
||||||
# gate before publishing a release, never trust that main was green.
|
# gate before publishing a release, never trust that main was green.
|
||||||
|
|||||||
@@ -56,3 +56,6 @@ go test ./... -race
|
|||||||
```
|
```
|
||||||
|
|
||||||
No `buf`/`protoc` install needed — `kmsvc-proto`'s generated Go code is consumed as a plain module dependency.
|
No `buf`/`protoc` install needed — `kmsvc-proto`'s generated Go code is consumed as a plain module dependency.
|
||||||
|
# Final test - clean cache removal
|
||||||
|
# Final CI validation - Forgejo ready
|
||||||
|
# CI cleanup - removed upload-artifact
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
kafkamgmtv1 "forgejo.riotpiao.com/rock/kmsvc-proto/gen/kafkamgmt/v1"
|
kafkamgmtv1 "forgejo.riotpiao.com/riotpiao-poimen/kmsvc-proto/gen/kafkamgmt/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestClientAttachesBearerToken(t *testing.T) {
|
func TestClientAttachesBearerToken(t *testing.T) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
kafkamgmtv1 "forgejo.riotpiao.com/rock/kmsvc-proto/gen/kafkamgmt/v1"
|
kafkamgmtv1 "forgejo.riotpiao.com/riotpiao-poimen/kmsvc-proto/gen/kafkamgmt/v1"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/credentials"
|
"google.golang.org/grpc/credentials"
|
||||||
"google.golang.org/grpc/credentials/insecure"
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
kmsvc "forgejo.riotpiao.com/rock/kmsvc-sdk"
|
kmsvc "forgejo.riotpiao.com/riotpiao-poimen/kmsvc-sdk"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
module forgejo.riotpiao.com/rock/kmsvc-sdk
|
module forgejo.riotpiao.com/riotpiao-poimen/kmsvc-sdk
|
||||||
|
|
||||||
go 1.25.0
|
go 1.26.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
forgejo.riotpiao.com/rock/kmsvc-proto v1.4.0
|
forgejo.riotpiao.com/riotpiao-poimen/kmsvc-proto v1.4.0
|
||||||
google.golang.org/grpc v1.81.1
|
google.golang.org/grpc v1.81.1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
forgejo.riotpiao.com/rock/kmsvc-proto v1.4.0 h1:4id+KXQhHndnlX6TC0XCYzq0MWhQWWJi09zQq4KPdR8=
|
forgejo.riotpiao.com/riotpiao-poimen/kmsvc-proto v1.4.0 h1:4id+KXQhHndnlX6TC0XCYzq0MWhQWWJi09zQq4KPdR8=
|
||||||
forgejo.riotpiao.com/rock/kmsvc-proto v1.4.0/go.mod h1:Tvldxxalok/gCZPaUhPNLxJleRmaF0UIlLCa/MSrHg0=
|
forgejo.riotpiao.com/riotpiao-poimen/kmsvc-proto v1.4.0/go.mod h1:Tvldxxalok/gCZPaUhPNLxJleRmaF0UIlLCa/MSrHg0=
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
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/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
kafkamgmtv1 "forgejo.riotpiao.com/rock/kmsvc-proto/gen/kafkamgmt/v1"
|
kafkamgmtv1 "forgejo.riotpiao.com/riotpiao-poimen/kmsvc-proto/gen/kafkamgmt/v1"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/credentials/insecure"
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
"google.golang.org/grpc/metadata"
|
"google.golang.org/grpc/metadata"
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
kafkamgmtv1 "forgejo.riotpiao.com/rock/kmsvc-proto/gen/kafkamgmt/v1"
|
kafkamgmtv1 "forgejo.riotpiao.com/riotpiao-poimen/kmsvc-proto/gen/kafkamgmt/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MaxReceiveMessages mirrors the server-side cap (design.md §2b).
|
// MaxReceiveMessages mirrors the server-side cap (design.md §2b).
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
kafkamgmtv1 "forgejo.riotpiao.com/rock/kmsvc-proto/gen/kafkamgmt/v1"
|
kafkamgmtv1 "forgejo.riotpiao.com/riotpiao-poimen/kmsvc-proto/gen/kafkamgmt/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestReceiveMessageMapsResponse(t *testing.T) {
|
func TestReceiveMessageMapsResponse(t *testing.T) {
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
kafkamgmtv1 "forgejo.riotpiao.com/rock/kmsvc-proto/gen/kafkamgmt/v1"
|
kafkamgmtv1 "forgejo.riotpiao.com/riotpiao-poimen/kmsvc-proto/gen/kafkamgmt/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MaxMessageBodyBytes matches SQS's message size cap (design.md §11.2).
|
// MaxMessageBodyBytes matches SQS's message size cap (design.md §11.2).
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
kafkamgmtv1 "forgejo.riotpiao.com/rock/kmsvc-proto/gen/kafkamgmt/v1"
|
kafkamgmtv1 "forgejo.riotpiao.com/riotpiao-poimen/kmsvc-proto/gen/kafkamgmt/v1"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user