Skip to content

Commit d9bb344

Browse files
authored
refactor!: relocate go sdk (#3889)
* refactor!: relocate go sdk moving to https://github.com/4paradigm/openmldb-go-sdk * go readme * ci: fix sdk workflow
1 parent 3d9eb1e commit d9bb344

File tree

4 files changed

+12
-54
lines changed

4 files changed

+12
-54
lines changed

.github/workflows/sdk.yml

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -368,49 +368,8 @@ jobs:
368368
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
369369
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
370370

371-
go-sdk:
372-
runs-on: ubuntu-latest
373-
container:
374-
image: ghcr.io/4paradigm/hybridsql:latest
375-
env:
376-
OPENMLDB_BUILD_TARGET: "openmldb"
377-
OPENMLDB_MODE: standalone
378-
steps:
379-
- uses: actions/checkout@v2
380-
381-
- uses: actions/setup-go@v3
382-
with:
383-
go-version: 1.18
384-
385-
- name: build openmldb
386-
run: make build install
387-
388-
- name: start server
389-
run: ./openmldb/sbin/start-all.sh
390-
391-
- name: init test database
392-
env:
393-
OPENMLDB_NS_HOST: 127.0.0.1
394-
OPENMLDB_NS_PORT: 6527
395-
run: |
396-
echo "CREATE DATABASE test_db;" | ./openmldb/bin/openmldb --host=$OPENMLDB_NS_HOST --port=$OPENMLDB_NS_PORT
397-
398-
- name: go test
399-
env:
400-
OPENMLDB_APISERVER_HOST: 127.0.0.1
401-
OPENMLDB_APISERVER_PORT: 8080
402-
working-directory: go
403-
run: go test ./... -race -covermode=atomic -coverprofile=coverage.out
404-
405-
- name: upload coverage
406-
uses: actions/upload-artifact@v3
407-
with:
408-
name: coverage-go-report-${{ github.sha }}
409-
path: go/coverage.out
410-
retention-days: 3
411-
412371
publish-test-results:
413-
needs: ["java-sdk", "python-sdk", "go-sdk"]
372+
needs: ["java-sdk", "python-sdk"]
414373
# the action will only run on 4paradigm/OpenMLDB's context, not for fork repo or dependabot
415374
if: >
416375
always() && github.event_name == 'push' || (
@@ -426,7 +385,7 @@ jobs:
426385
comment_title: SDK Test Report
427386

428387
publish-coverage-results:
429-
needs: ["java-sdk", "python-sdk", "go-sdk"]
388+
needs: ["java-sdk", "python-sdk"]
430389
runs-on: ubuntu-latest
431390
steps:
432391
- uses: actions/checkout@v4
@@ -445,16 +404,10 @@ jobs:
445404
name: coverage-python-report-${{ github.sha }}
446405
path: python
447406

448-
- name: Download Artifacts (go)
449-
uses: actions/download-artifact@v3
450-
with:
451-
name: coverage-go-report-${{ github.sha }}
452-
path: go
453-
454407
- name: Upload Coverage Report
455408
uses: codecov/codecov-action@v4
456409
with:
457-
files: go/coverage.out,python/openmldb_sdk/tests/coverage.xml,python/openmldb_tool/tests/coverage.xml,java/**/target/site/jacoco/jacoco.xml,java/**/target/scoverage.xml
410+
files: python/openmldb_sdk/tests/coverage.xml,python/openmldb_tool/tests/coverage.xml,java/**/target/site/jacoco/jacoco.xml,java/**/target/scoverage.xml
458411
name: coverage-sdk
459412
token: ${{ secrets.CODECOV_TOKEN }}
460413
fail_ci_if_error: true

docs/en/quickstart/sdk/go_sdk.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The current functionality support of the Go SDK is not yet complete. It is curre
1111
## Go SDK installation
1212

1313
```bash
14-
go get github.com/4paradigm/OpenMLDB/go
14+
go get github.com/4paradigm/openmldb-go-sdk
1515
```
1616

1717
## Go SDK usage
@@ -79,7 +79,7 @@ import (
7979
"database/sql"
8080

8181
// Load OpenMLDB SDK
82-
_ "github.com/4paradigm/OpenMLDB/go"
82+
_ "github.com/4paradigm/openmldb-go-sdk
8383
)
8484
8585
func main() {

docs/zh/quickstart/sdk/go_sdk.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Go SDK 目前功能支持上并不完善,目前仅用于开发测试或者特
1212
## Go SDK 包安装
1313

1414
```Bash
15-
go get github.com/4paradigm/OpenMLDB/go
15+
go get github.com/4paradigm/openmldb-go-sdk
1616
```
1717

1818
## 使用 Go SDK
@@ -80,7 +80,7 @@ import (
8080
"database/sql"
8181

8282
// 加载 OpenMLDB SDK
83-
_ "github.com/4paradigm/OpenMLDB/go"
83+
_ "github.com/4paradigm/openmldb-go-sdk"
8484
)
8585

8686
func main() {

go/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
**Moved to https://github.com/4paradigm/openmldb-go-sdk**
2+
3+
Please note this directory only reserved for backwards compatibility use over `github.com/4paradigm/OpenMLDB/go`, and will removed anytime in later releases.
4+
5+
Consider migrate to `github.com/4paradigm/openmldb-go-sdk`.

0 commit comments

Comments
 (0)