Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gostnops
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wei.xuan
gostnops
Commits
f60d3dff
Commit
f60d3dff
authored
Nov 13, 2020
by
AlexStocks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mod github actions
parent
65fe60f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
github-actions.yml
.github/workflows/github-actions.yml
+21
-0
before_validate_license.sh
before_validate_license.sh
+26
-0
No files found.
.github/workflows/github-actions.yml
View file @
f60d3dff
...
...
@@ -5,6 +5,8 @@ on:
branches
:
[
master
]
pull_request
:
branches
:
"
*"
pull_request_target
:
branches
:
"
*"
jobs
:
build
:
...
...
@@ -38,15 +40,34 @@ jobs:
key
:
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
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/gost repository.
-
name
:
DingTalk Message Notify only Push
...
...
before_validate_license.sh
0 → 100644
View file @
f60d3dff
#
# 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.
remoteLicenseCheckerPath
=
"https://github.com/dubbogo/resources/raw/master/tools/license"
remoteLicenseCheckerName
=
"license-header-checker"
remoteLicenseCheckerURL
=
"
${
remoteLicenseCheckerPath
}
/
${
remoteLicenseCheckerName
}
"
remoteLicenseName
=
"license.txt"
remoteLicenseURL
=
"
${
remoteLicenseCheckerPath
}
/
${
remoteLicenseName
}
"
licensePath
=
"/tmp/tools/license"
mkdir
-p
${
licensePath
}
wget
-P
"
${
licensePath
}
"
${
remoteLicenseCheckerURL
}
wget
-P
"
${
licensePath
}
"
${
remoteLicenseURL
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment