Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sidecar-client-fabric
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
link33
sidecar-client-fabric
Commits
5b75609a
Commit
5b75609a
authored
Apr 01, 2020
by
Alexader
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(*): add test cover and workflow in github
1. add test cover for coverage report in workflow 2. add workflow for github action
parent
c20c7e19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
2 deletions
+83
-2
build.yml
.github/workflows/build.yml
+70
-0
.gitignore
.gitignore
+8
-2
Makefile
Makefile
+5
-0
No files found.
.github/workflows/build.yml
0 → 100644
View file @
5b75609a
name
:
build
on
:
push
:
branches
:
[
master
]
pull_request
:
branches
:
[
master
]
jobs
:
lint
:
name
:
Run golanci-lint
runs-on
:
ubuntu-latest
steps
:
-
name
:
Set up Go 1.13
uses
:
actions/setup-go@v1
with
:
go-version
:
1.13
-
name
:
Check out code into the Go module directory
uses
:
actions/checkout@v2
-
name
:
Run golangci-lint
uses
:
Mushus/golangci-linter@v1
-
name
:
Go report card
uses
:
creekorful/goreportcard-action@v1.0
test
:
name
:
Run unittest
runs-on
:
ubuntu-latest
steps
:
-
name
:
Set up Go
uses
:
actions/setup-go@v1
with
:
go-version
:
1.13
-
name
:
Check out code
uses
:
actions/checkout@v1
-
name
:
Run Unit tests.
run
:
|
git clone https://github.com/meshplus/pier.git ../pier
export PATH=$PATH:$(go env GOPATH)/bin
make prepare
make test-coverage
# - name: Upload Coverage report to CodeCov
# uses: codecov/codecov-action@v1.0.0
# with:
# token: ${{secrets.CODECOV_TOKEN}}
#file: ./coverage.txt
build
:
name
:
Build project
runs-on
:
ubuntu-latest
needs
:
[
lint
,
test
]
steps
:
-
name
:
Set up Go 1.13
uses
:
actions/setup-go@v1
with
:
go-version
:
1.13
-
name
:
Check out code into the Go module directory
uses
:
actions/checkout@v2
-
name
:
Go build
run
:
|
git clone https://github.com/meshplus/pier.git ../pier
go build -v --buildmode=plugin ./*.go
.gitignore
View file @
5b75609a
.DS_Store
build
.idea
\ No newline at end of file
.idea
*.so
*.tar
logs/*
bin
cover.out
cover.html
coverage.txt
Makefile
View file @
5b75609a
...
...
@@ -10,6 +10,11 @@ help: Makefile
prepare
:
cd
scripts
&&
bash prepare.sh
## make test-coverage: Test project with cover
test-coverage
:
@
go
test
-short
-coverprofile
cover.out
-covermode
=
atomic
${
TEST_PKGS
}
@
cat
cover.out
>>
coverage.txt
## make fabric1.4: build fabric(1.4) client plugin
fabric1.4
:
mkdir
-p
build
...
...
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