forked from apache/dubbo-go-pixiu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request apache#1 from dubbogo/develop
Marge new request to my branch
- Loading branch information
Showing
21 changed files
with
845 additions
and
132 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,11 @@ name: CI | |
|
||
on: | ||
push: | ||
branches: [master, develop] | ||
branches: [ master, develop ] | ||
pull_request: | ||
branches: "*" | ||
pull_request_target: | ||
branches: "*" | ||
|
||
jobs: | ||
|
||
|
@@ -26,97 +28,91 @@ jobs: | |
|
||
steps: | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go_version }} | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
# Cache | ||
path: ~/go/pkg/mod | ||
# Cache key | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Get dependencies | ||
run: | | ||
if [ -f Gopkg.toml ]; then | ||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
dep ensure | ||
else | ||
go get -v -t -d ./... | ||
fi | ||
- name: Go Fmt | ||
run: go fmt ./... && [[ -z `git status -s` ]] | ||
|
||
- name: License Check | ||
run: | | ||
go fmt ./... && [[ -z `git status -s` ]] | ||
sh before_validate_license.sh | ||
chmod u+x /tmp/tools/license/license-header-checker | ||
/tmp/tools/license/license-header-checker -v -a -r -i vendor /tmp/tools/license/license.txt . go && [[ -z `git status -s` ]] | ||
- name: Go Test | ||
run: GO111MODULE=on && go mod vendor && go test ./... -bench . -race -v -coverprofile=coverage.txt | ||
|
||
# - name: Test | ||
# run: | | ||
# chmod u+x before_ut.sh && ./before_ut.sh | ||
# go mod vendor && go test ./... -coverprofile=coverage.txt -covermode=atomic | ||
# chmod +x integrate_test.sh && ./integrate_test.sh | ||
|
||
- name: Coverage | ||
run: bash <(curl -s https://codecov.io/bash) | ||
|
||
- name: Hello world | ||
run: echo Hello world ${{ secrets.PROXY_DING_TOKEN }} ${{ secrets.PROXY_DING_SIGN }} | ||
|
||
# Because the contexts of push and PR are different, there are two Notify. | ||
# Notifications are triggered only in the dubbogo/dubbo-go-proxy repository. | ||
- name: DingTalk Message Notify only Push | ||
uses: zcong1993/[email protected] | ||
# Whether job is successful or not, always () is always true. | ||
if: | | ||
always() && | ||
github.event_name == 'push' && | ||
github.repository == 'dubbogo/dubbo-go-proxy' | ||
with: | ||
# DingDing bot token | ||
dingToken: ${{ env.DING_TOKEN }} | ||
secret: ${{ env.DING_SIGN }} | ||
# Post Body to send | ||
body: | | ||
{ | ||
"msgtype": "markdown", | ||
"markdown": { | ||
"title": "Github Actions", | ||
"text": "## Github Actions \n - name: CI \n - repository: ${{ github.repository }} \n - trigger: ${{ github.actor }} \n - event: ${{ github.event_name }} \n - ref: ${{ github.ref }} \n - status: [${{ job.status }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) \n - environment: ${{ runner.os }} \n - SHA: [${{ github.sha }}](${{ github.event.compare }})" | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go_version }} | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
# Cache | ||
path: ~/go/pkg/mod | ||
# Cache key | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Get dependencies | ||
run: | | ||
if [ -f Gopkg.toml ]; then | ||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
dep ensure | ||
else | ||
go get -v -t -d ./... | ||
fi | ||
- name: Go Fmt | ||
run: go fmt ./... && [[ -z `git status -s` ]] | ||
|
||
- name: License Check | ||
run: | | ||
go fmt ./... && [[ -z `git status -s` ]] | ||
sh before_validate_license.sh | ||
chmod u+x /tmp/tools/license/license-header-checker | ||
/tmp/tools/license/license-header-checker -v -a -r -i vendor /tmp/tools/license/license.txt . go && [[ -z `git status -s` ]] | ||
- name: Go Test | ||
run: GO111MODULE=on && go mod vendor && go test ./... -bench . -race -v -coverprofile=coverage.txt | ||
|
||
- name: Coverage | ||
run: bash <(curl -s https://codecov.io/bash) | ||
|
||
- name: Hello world | ||
run: echo Hello world ${{ secrets.PROXY_DING_TOKEN }} ${{ secrets.PROXY_DING_SIGN }} | ||
|
||
# Because the contexts of push and PR are different, there are two Notify. | ||
# Notifications are triggered only in the dubbogo/dubbo-go-proxy repository. | ||
- name: DingTalk Message Notify only Push | ||
uses: zcong1993/[email protected] | ||
# Whether job is successful or not, always () is always true. | ||
if: | | ||
always() && | ||
github.event_name == 'push' && | ||
github.repository == 'dubbogo/dubbo-go-proxy' | ||
with: | ||
# DingDing bot token | ||
dingToken: ${{ env.DING_TOKEN }} | ||
secret: ${{ env.DING_SIGN }} | ||
# Post Body to send | ||
body: | | ||
{ | ||
"msgtype": "markdown", | ||
"markdown": { | ||
"title": "Github Actions", | ||
"text": "## Github Actions \n - name: CI \n - repository: ${{ github.repository }} \n - trigger: ${{ github.actor }} \n - event: ${{ github.event_name }} \n - ref: ${{ github.ref }} \n - status: [${{ job.status }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) \n - environment: ${{ runner.os }} \n - SHA: [${{ github.sha }}](${{ github.event.compare }})" | ||
} | ||
} | ||
} | ||
- name: DingTalk Message Notify only PR | ||
uses: zcong1993/[email protected] | ||
if: | | ||
always() && | ||
github.event_name == 'pull_request' && | ||
github.repository == 'dubbogo/dubbo-go-proxy' | ||
with: | ||
dingToken: ${{ env.DING_TOKEN }} | ||
secret: ${{ env.DING_SIGN }} | ||
body: | | ||
{ | ||
"msgtype": "markdown", | ||
"markdown": { | ||
"title": "Github Actions", | ||
"text": "## Github Actions \n - name: CI \n - repository: ${{ github.repository }} \n - pr_title: ${{ github.event.pull_request.title }} \n - trigger: ${{ github.actor }} \n - event: ${{ github.event_name }} \n - ref: [${{ github.ref }}](${{ github.event.pull_request._links.html.href }}) \n - status: [${{ job.status }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) \n - environment: ${{ runner.os }} \n > SHA: [${{ github.sha }}](${{ github.event.pull_request._links.html.href }})" | ||
- name: DingTalk Message Notify only PR | ||
uses: zcong1993/[email protected] | ||
if: | | ||
always() && | ||
github.event_name == 'pull_request_target' && | ||
github.repository == 'dubbogo/dubbo-go-proxy' | ||
with: | ||
dingToken: ${{ env.DING_TOKEN }} | ||
secret: ${{ env.DING_SIGN }} | ||
body: | | ||
{ | ||
"msgtype": "markdown", | ||
"markdown": { | ||
"title": "Github Actions", | ||
"text": "## Github Actions \n - name: CI \n - repository: ${{ github.repository }} \n - pr_title: ${{ github.event.pull_request.title }} \n - trigger: ${{ github.actor }} \n - event: ${{ github.event_name }} \n - ref: [${{ github.ref }}](${{ github.event.pull_request._links.html.href }}) \n - status: [${{ job.status }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) \n - environment: ${{ runner.os }} \n > SHA: [${{ github.sha }}](${{ github.event.pull_request._links.html.href }})" | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
./dubbo-go-proxy | ||
/logs | ||
/.idea | ||
/.idea | ||
/.vscode |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,56 @@ | ||
- name: "test-dubbo/user" | ||
target: "queryUser" | ||
method: "POST" | ||
types: | ||
- "com.ikurento.user.User" | ||
name: api name | ||
description: api description | ||
resources: | ||
- path: '/' | ||
type: restful | ||
description: resource documentation | ||
filters: | ||
- filter0 | ||
methods: | ||
- httpVerb: GET | ||
filters: | ||
- filterA | ||
- filterB | ||
onAir: true | ||
inboundRequest: | ||
requestType: http | ||
headers: | ||
- name: auth | ||
required: true | ||
queryStrings: | ||
- name: id | ||
required: false | ||
- name: type | ||
required: false | ||
requestBody: | ||
- definitionName: modelDefinition | ||
integrationRequest: | ||
requestType: dubbo | ||
mappingParams: | ||
- name: queryStrings.id | ||
mapTo: 1 | ||
applicationName: BDTService | ||
group: test | ||
version: 1.0.0 | ||
interface: com.ikurento.user.UserProvider | ||
Method: GetUser | ||
paramTypes: | ||
- java.lang.String | ||
ClusterName: test_dubbo | ||
definitions: | ||
- name: modelDefinition | ||
schema: >- | ||
{ | ||
"type" : "object", | ||
"properties" : { | ||
"id" : { | ||
"type" : "integer" | ||
}, | ||
"type" : { | ||
"type" : "string" | ||
}, | ||
"price" : { | ||
"type" : "number" | ||
} | ||
} | ||
} |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
intTest: 11 | ||
booleanTest: false | ||
strTest: "strTest" | ||
|
||
child: | ||
strTest: "childStrTest" |
Oops, something went wrong.