1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00

Setup CI and coverage tools

This commit is contained in:
Achilleas Anagnostopoulos 2017-03-26 09:48:12 +01:00
parent 8c41bf6404
commit cc1f2e6016
3 changed files with 30 additions and 0 deletions

10
.travis.yml Normal file
View File

@ -0,0 +1,10 @@
language: go
sudo: required
go:
- 1.8
before_install:
- go get -t -v ./...
script:
- bash coverage.sh
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@ -1,2 +1,6 @@
# gopheros
L[![Build Status](https://travis-ci.org/achilleasa/gopher-os.svg?branch=master)](https://travis-ci.org/achilleasa/gopher-os)
[![codecov](https://codecov.io/gh/achilleasa/gopher-os/branch/master/graph/badge.svg)](https://codecov.io/gh/achilleasa/gopher-os)
[![Go Report Card](https://goreportcard.com/badge/github.com/achilleasa/gopher-os)](https://goreportcard.com/report/github.com/achilleasa/gopher-os)
Let's write an experimental OS in Go!

16
coverage.sh Normal file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e
go test -v -race ./...
echo "" > coverage.txt
for d in $(go list ./... | grep -v vendor); do
# Running with -race and -covermode=atomic generates false positives so
# we run the -race bit separately
go test -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done