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:
parent
8c41bf6404
commit
cc1f2e6016
10
.travis.yml
Normal file
10
.travis.yml
Normal 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)
|
@ -1,2 +1,6 @@
|
|||||||
# gopheros
|
# gopheros
|
||||||
|
L[](https://travis-ci.org/achilleasa/gopher-os)
|
||||||
|
[](https://codecov.io/gh/achilleasa/gopher-os)
|
||||||
|
[](https://goreportcard.com/report/github.com/achilleasa/gopher-os)
|
||||||
|
|
||||||
Let's write an experimental OS in Go!
|
Let's write an experimental OS in Go!
|
||||||
|
16
coverage.sh
Normal file
16
coverage.sh
Normal 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
|
Loading…
x
Reference in New Issue
Block a user