feat: support run thriftgo and plugin as golang sdk #824
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push Check | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.17 | |
- uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Check License Header | |
uses: apache/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Unit Test | |
run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./... | |
- name: Lint | |
run: | | |
go vet -stdmethods=false $(go list ./...) | |
echo "go vet done!" | |
codegen-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.17' | |
- name: Prepare | |
run: | | |
go install | |
go install github.com/cloudwego/kitex/tool/cmd/kitex@develop | |
LOCAL_REPO=$(pwd) | |
cd .. | |
git clone https://github.com/cloudwego/kitex-tests.git | |
cd kitex-tests/codegen | |
go mod init codegen-test | |
go mod edit -replace=github.com/apache/thrift=github.com/apache/[email protected] | |
go mod edit -replace github.com/cloudwego/thriftgo=${LOCAL_REPO} | |
go mod edit -replace github.com/cloudwego/kitex=github.com/cloudwego/kitex@develop | |
go mod tidy | |
bash -version | |
bash ./codegen_install_check.sh | |
- name: CodeGen | |
run: | | |
cd ../kitex-tests/codegen | |
tree | |
bash ./codegen_run.sh |