Browse Source

add coverage result to codecov

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

18
.travis.yml

@ -5,6 +5,8 @@ go:
- 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
- sudo apt-get install -y libpam-dev - sudo apt-get install -y libpam-dev
@ -14,4 +16,18 @@ env:
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