-
Notifications
You must be signed in to change notification settings - Fork 934
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 #1 from apache/develop
Develop
- Loading branch information
Showing
387 changed files
with
1,627 additions
and
7,320 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
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,18 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "github-actions" | ||
# Workflow files stored in the | ||
# default location of `.github/workflows` | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,54 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [master, ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [master] | ||
schedule: | ||
- cron: '0 4 * * 5' | ||
|
||
jobs: | ||
analyse: | ||
name: Analyse | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
# We must fetch at least the immediate parents so that if this is | ||
# a pull request then we can checkout the head. | ||
fetch-depth: 2 | ||
|
||
# If this run was triggered by a pull request event, then checkout | ||
# the head of the pull request instead of the merge commit. | ||
- run: git checkout HEAD^2 | ||
if: ${{ github.event_name == 'pull_request' }} | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
# Override language selection by uncommenting this and choosing your languages | ||
# with: | ||
# languages: go, javascript, csharp, python, cpp, java | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
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 |
---|---|---|
|
@@ -20,8 +20,8 @@ jobs: | |
- ubuntu-latest | ||
|
||
env: | ||
DING_TOKEN: "6374f1bf8d4f23cde81d4a4b8c1f0bc98cc92b5151ca938ab938d3d7f4230fc4" | ||
DING_SIGN: "SECa98677289194bb0e5caec3051301d06515750ff1bd2f932a4704298afb2e0ae6" | ||
DING_TOKEN: ${{ secrets.DING_TOKEN }} | ||
DING_SIGN: ${{ secrets.DING_SIGN }} | ||
|
||
steps: | ||
|
||
|
@@ -54,29 +54,27 @@ jobs: | |
go get -v -t -d ./... | ||
fi | ||
- name: License Check | ||
- name: Verify | ||
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` ]] | ||
make verify | ||
- name: Test | ||
- name: Integrate 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 | ||
- name: Post Coverage | ||
run: bash <(curl -s https://codecov.io/bash) | ||
|
||
|
||
- name: Hello world | ||
run: echo Hello world ${{ secrets.DING_TOKEN }} ${{ secrets.DING_SIGN }} | ||
|
||
# Because the contexts of push and PR are different, there are two Notify. | ||
# Notifications are triggered only in the apache/dubbo-go repository. | ||
# Notifications are triggered only in the dubbogo/gost repository. | ||
- name: DingTalk Message Notify only Push | ||
uses: zcong1993/[email protected] | ||
# Whether job is successful or not, always () is always true. | ||
if: | | ||
always() && | ||
always() && | ||
github.event_name == 'push' && | ||
github.repository == 'apache/dubbo-go' | ||
with: | ||
|
@@ -89,16 +87,16 @@ jobs: | |
"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 }})" | ||
"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 == 'apache/dubbo-go' | ||
if: | | ||
always() && | ||
github.event_name == 'pull_request' && | ||
github.repository == 'dubbogo/gost' | ||
with: | ||
dingToken: ${{ env.DING_TOKEN }} | ||
secret: ${{ env.DING_SIGN }} | ||
|
@@ -107,6 +105,6 @@ jobs: | |
"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 }})" | ||
"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
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,76 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
VERSION ?= latest | ||
|
||
GO = go | ||
GO_PATH = $(shell $(GO) env GOPATH) | ||
GO_OS = $(shell $(GO) env GOOS) | ||
ifeq ($(GO_OS), darwin) | ||
GO_OS = mac | ||
endif | ||
GO_BUILD = $(GO) build | ||
GO_GET = $(GO) get | ||
GO_TEST = $(GO) test | ||
GO_BUILD_FLAGS = -v | ||
GO_BUILD_LDFLAGS = -X main.version=$(VERSION) | ||
|
||
GO_LICENSE_CHECKER_DIR = license-header-checker-$(GO_OS) | ||
GO_LICENSE_CHECKER = $(GO_PATH)/bin/license-header-checker | ||
LICENSE_DIR = /tmp/tools/license | ||
|
||
ARCH = amd64 | ||
# for add zookeeper fatjar | ||
ZK_TEST_LIST=config_center/zookeeper registry/zookeeper cluster/router/chain cluster/router/condition cluster/router/tag metadata/report/zookeeper | ||
ZK_JAR_NAME=zookeeper-3.4.9-fatjar.jar | ||
ZK_FATJAR_BASE=/zookeeper-4unittest/contrib/fatjar | ||
ZK_JAR_PATH=remoting/zookeeper$(ZK_FATJAR_BASE) | ||
ZK_JAR=$(ZK_JAR_PATH)/$(ZK_JAR_NAME) | ||
|
||
SHELL = /bin/bash | ||
|
||
prepareLic: | ||
$(GO_LICENSE_CHECKER) -version || (wget https://github.com/lsm-dev/license-header-checker/releases/download/v1.2.0/$(GO_LICENSE_CHECKER_DIR).zip -O $(GO_LICENSE_CHECKER_DIR).zip && unzip -o $(GO_LICENSE_CHECKER_DIR).zip && mkdir -p $(GO_PATH)/bin/ && cp $(GO_LICENSE_CHECKER_DIR)/64bit/license-header-checker $(GO_PATH)/bin/) | ||
ls /tmp/tools/license/license.txt || wget -P $(LICENSE_DIR) https://github.com/dubbogo/resources/raw/master/tools/license/license.txt | ||
|
||
prepareZk: | ||
ls $(ZK_JAR) || (mkdir -p $(ZK_JAR_PATH)&& wget -P $(ZK_JAR_PATH) https://github.com/dubbogo/resources/raw/master/zookeeper-4unitest/contrib/fatjar/${ZK_JAR_NAME}) | ||
@for i in $(ZK_TEST_LIST); do \ | ||
mkdir -p $$i$(ZK_FATJAR_BASE);\ | ||
cp ${ZK_JAR} $$i$(ZK_FATJAR_BASE);\ | ||
done | ||
|
||
prepare: prepareZk prepareLic | ||
|
||
.PHONE: test | ||
test: clean prepareZk | ||
$(GO_TEST) ./... -coverprofile=coverage.txt -covermode=atomic | ||
|
||
deps: prepare | ||
$(GO_GET) -v -t -d ./... | ||
|
||
.PHONY: license | ||
license: clean prepareLic | ||
$(GO_LICENSE_CHECKER) -v -a -r -i vendor $(LICENSE_DIR)/license.txt . go && [[ -z `git status -s` ]] | ||
|
||
.PHONY: verify | ||
verify: clean license test | ||
|
||
.PHONY: clean | ||
clean: prepare | ||
rm -rf coverage.txt | ||
rm -rf license-header-checker* |
Oops, something went wrong.