Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some handler tests #223

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,35 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.23'
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
args: --timeout=5m
swagger:
name: swagger-gen
strategy:
matrix:
go: ["1.23"]
runs-on: ubuntu-latest
steps:
- name: Setup Go
with:
go-version: ${{ matrix.go }}
uses: actions/setup-go@v2

- uses: actions/checkout@v2

- name: Gen
run: |
go install github.com/swaggo/swag/cmd/swag@latest
make swag
test:
name: test
strategy:
matrix:
go: ["1.21.x"]
go: ["1.23"]
runs-on: ubuntu-latest
steps:
- name: Setup Go
Expand Down
18 changes: 16 additions & 2 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,23 @@ packages:
TagComponent:
AccountingComponent:
SpaceComponent:
SpaceResourceComponent:
RuntimeArchitectureComponent:
SensitiveComponent:
CodeComponent:
PromptComponent:
ModelComponent:
UserComponent:
GitHTTPComponent:
DiscussionComponent:
DatasetComponent:
CollectionComponent:
InternalComponent:
MirrorSourceComponent:
MirrorComponent:
EvaluationComponent:


opencsg.com/csghub-server/user/component:
config:
interfaces:
Expand Down Expand Up @@ -67,7 +77,7 @@ packages:
opencsg.com/csghub-server/mq:
config:
interfaces:
MessageQueue:
MessageQueue:
opencsg.com/csghub-server/builder/store/s3:
config:
interfaces:
Expand All @@ -92,7 +102,7 @@ packages:
config:
interfaces:
Builder:

opencsg.com/csghub-server/accounting/component:
config:
interfaces:
Expand All @@ -116,3 +126,7 @@ packages:
config:
interfaces:
Msg:
go.temporal.io/sdk/client:
config:
interfaces:
Client:
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: test lint cover mock_wire mock_gen
.PHONY: test lint cover mock_wire mock_gen swag

test:
go test ./...

Expand All @@ -25,3 +25,6 @@ mock_wire:

mock_gen:
mockery

swag:
swag init --pd -d cmd/csghub-server/cmd/start,api/router,api/handler,builder/store/database,common/types,accounting/handler,user/handler,component -g server.go
Loading
Loading