Commit ab696284 authored by madengji's avatar madengji Committed by 33cn

add coverage

parent ac89e23a
...@@ -18,32 +18,34 @@ jobs: ...@@ -18,32 +18,34 @@ jobs:
- gometalinter.v2 -i - gometalinter.v2 -i
- go get -u mvdan.cc/sh/cmd/shfmt - go get -u mvdan.cc/sh/cmd/shfmt
- go get -u mvdan.cc/sh/cmd/gosh - go get -u mvdan.cc/sh/cmd/gosh
script: skip script:
# - make checkgofmt && make fmt_go - make checkgofmt && make fmt_go
# - make linter - make linter
- stage: test - stage: test
before_install:
- go get -t -v ./...
install: skip install: skip
script: script:
- make coverage - make coverage
after_success: after_success:
- bash <(curl -s https://codecov.io/bash) - bash <(curl -s https://codecov.io/bash)
# - stage: deploy - stage: deploy
# sudo: required sudo: required
# services: services:
# - docker - docker
# env: env:
# - DOCKER_COMPOSE_VERSION=1.21.2 - DOCKER_COMPOSE_VERSION=1.21.2
# install: install:
# - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# - sudo apt-get update - sudo apt-get update
# - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
# - sudo rm /usr/local/bin/docker-compose - sudo rm /usr/local/bin/docker-compose
# - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
# - chmod +x docker-compose - chmod +x docker-compose
# - sudo mv docker-compose /usr/local/bin - sudo mv docker-compose /usr/local/bin
# before_script: make build_ci before_script: make build_ci
# script: script:
# - make docker-compose && make docker-compose-down && make docker-compose DAPP=paracross && make docker-compose-down DAPP=paracross && make docker-compose DAPP=relay && make docker-compose-down DAPP=relay - make docker-compose && make docker-compose-down && make docker-compose DAPP=paracross && make docker-compose-down DAPP=paracross && make docker-compose DAPP=relay && make docker-compose-down DAPP=relay
...@@ -4,7 +4,7 @@ https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/6874 ...@@ -4,7 +4,7 @@ https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/6874
[![pipeline status](https://api.travis-ci.org/33cn/plugin.svg?branch=master)](https://travis-ci.org/33cn/plugin/) [![pipeline status](https://api.travis-ci.org/33cn/plugin.svg?branch=master)](https://travis-ci.org/33cn/plugin/)
[![Go Report Card](https://goreportcard.com/badge/github.com/33cn/plugin?branch=master)](https://goreportcard.com/report/github.com/33cn/plugin) [![Go Report Card](https://goreportcard.com/badge/github.com/33cn/plugin?branch=master)](https://goreportcard.com/report/github.com/33cn/plugin)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/33cn/plugin?svg=true&branch=master&passingText=Windows%20-%20OK&failingText=Windows%20-%20failed&pendingText=Windows%20-%20pending)](https://ci.appveyor.com/project/33cn/plugin) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/33cn/plugin?svg=true&branch=master&passingText=Windows%20-%20OK&failingText=Windows%20-%20failed&pendingText=Windows%20-%20pending)](https://ci.appveyor.com/project/33cn/plugin)
[![codecov](https://codecov.io/gh/mdj33/plugin/branch/add_deploy/graph/badge.svg)](https://codecov.io/gh/mdj33/plugin) [![codecov](https://codecov.io/gh/33cn/plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/33cn/plugin)
# chain33 官方插件系统 # chain33 官方插件系统
* chain33地址: https://github.com/33cn/chain33 * chain33地址: https://github.com/33cn/chain33
......
...@@ -5,10 +5,8 @@ set -e -o pipefail ...@@ -5,10 +5,8 @@ set -e -o pipefail
COVERAGE_DIR="${COVERAGE_DIR:-build/coverage}" COVERAGE_DIR="${COVERAGE_DIR:-build/coverage}"
#PKG_LIST=$(go list ./... | grep -v "vendor" | grep -v "chain33/test" | grep -v "mock" | grep -v "mocks" \ PKG_LIST=$(go list ./... | grep -v "vendor" | grep -v "chain33/test" | grep -v "mock" | grep -v "mocks")
# | grep -v "cmd")
PKG_LIST=$(go list ./... | grep -E "token"|grep -v "consensus" |grep -v "crypto" | grep -v "store")
# Create the coverage files directory # Create the coverage files directory
mkdir -p "$COVERAGE_DIR" mkdir -p "$COVERAGE_DIR"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment