Browse Source

add coverage result to codecov

Change-Id: I5fca25e8d4e33da6eb412189022c2e871cb1801e
pull/4799/head
Wang Jing 7 years ago
parent
commit
ee86afe21e
  1. 20
      .travis.yml

20
.travis.yml

@ -4,6 +4,8 @@ go:
- 1.7 - 1.7
- 1.8 - 1.8
- master - master
go_import_path: github.com/gogits/gogs
before_install: before_install:
- sudo apt-get update -qq - sudo apt-get update -qq
@ -12,6 +14,20 @@ before_install:
env: env:
- GO15VENDOREXPERIMENT=1 - GO15VENDOREXPERIMENT=1
script: script:
- go build -v -tags "pam" - go build -v -tags "pam"
- go test -v -cover -race ./... - |#!/usr/bin/env bash
set -e
echo "" > coverage.txt
for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done
after_success:
- bash <(curl -s https://codecov.io/bash)

Loading…
Cancel
Save