Skip to content
Permalink
Browse files

improved coverage report and add support for travis-ci and coveralls

  • Loading branch information...
nicolaasuni committed Nov 22, 2015
1 parent 9a0b087 commit 967c9090ff7af5a44d629dbe01d3fe3f4356ca5b
Showing with 56 additions and 29 deletions.
  1. +22 −0 .travis.yml
  2. +4 −3 Makefile
  3. +30 −10 README.md
  4. +0 −16 coverage.sh
@@ -0,0 +1,22 @@
language: go

sudo: false

go:
- 1.5
- tip

before_install:
- go get github.com/mattn/goveralls

before_script:
- make deps

script:
- make qa

after_failure:
- cat ./target/test/report.xml

after_script:
- $HOME/gopath/bin/goveralls -covermode=count -coverprofile=target/report/coverage.out -service=travis-ci
@@ -47,7 +47,8 @@ all: help
# Run the unit tests
test:
@mkdir -p target/test
GOPATH=$(GOPATH) go test -race -v ./... | tee >(PATH=$(GOPATH)/bin:$(PATH) go-junit-report > target/test/report.xml); test $${PIPESTATUS[0]} -eq 0
@mkdir -p target/report
GOPATH=$(GOPATH) go test -covermode=count -coverprofile=target/report/coverage.out -bench=. -race -v ./... | tee >(PATH=$(GOPATH)/bin:$(PATH) go-junit-report > target/test/report.xml); test $${PIPESTATUS[0]} -eq 0

# Run the unit tests with the short option
test.short:
@@ -74,8 +75,7 @@ lint:

# Generate the coverage report
coverage:
@mkdir -p target/report
GOPATH=$(GOPATH) ./coverage.sh
GOPATH=$(GOPATH) go tool cover -html=target/report/coverage.out -o target/report/coverage.html

# Generate source docs
docs:
@@ -94,6 +94,7 @@ deps:
GOPATH=$(GOPATH) go get ./...
GOPATH=$(GOPATH) go get github.com/golang/lint/golint
GOPATH=$(GOPATH) go get github.com/jstemmer/go-junit-report
GOPATH=$(GOPATH) go get github.com/axw/gocov/gocov

# Deletes any intermediate file
nuke:
@@ -1,5 +1,7 @@
GoOse
=====
# GoOse

[![Build Status](https://secure.travis-ci.org/advancedlogic/GoOse.png?branch=master)](https://travis-ci.org/advancedlogic/GoOse?branch=master)
[![Coverage Status](https://coveralls.io/repos/advancedlogic/GoOse/badge.svg?branch=master&service=github)](https://coveralls.io/github/advancedlogic/GoOse?branch=master)

Html Content / Article Extractor in Golang

@@ -23,12 +25,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

INSTALL
=======
## INSTALL

```bash
go get github.com/advancedlogic/GoOse
```

HOW TO USE IT
=============
## HOW TO USE IT

```Go
package main
@@ -49,16 +52,33 @@ func main() {
}
```

TODO
====
## Development - Getting started

This application is written in GO language, please refere to the guides in https://golang.org for getting started.

This project include a Makefile that allows you to test and build the project with simple commands.
To see all available options:
```bash
make help
```

To build the project
```bash
make build
```

Before committing the code, please check if it passes all tests using
```bash
make qa
```

## TODO
- [ ] better organize code
- [ ] add comments and godoc
- [ ] improve "xpath" like queries
- [ ] add other image extractions techniques (imagemagick)

THANKS TO
=========
## THANKS TO
```
@Martin Angers for goquery
@Fatih Arslan for set

This file was deleted.

0 comments on commit 967c909

Please sign in to comment.
You can’t perform that action at this time.