Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Travis-CI #1

Merged
merged 1 commit into from
Nov 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
language: go

os: linux
dist: xenial

go:
- 1.11.x
- 1.12.x
- 1.x

cache:
apt:

addons:
apt:
packages:
- gobject-introspection
- gtk-doc-tools
- libcfitsio3-dev
- libfftw3-dev
- libgif-dev
- libgs-dev
- libgsf-1-dev
- libmatio-dev
- libopenslide-dev
- liborc-0.4-dev
- libpango1.0-dev
- libpoppler-glib-dev
- libwebp-dev
- libvips-dev

before_install:
- pkg-config --modversion vips
- go get -u github.com/mattn/goveralls

install:
- go get golang.org/x/lint/golint
- go get -v github.com/go-lintpack/lintpack/...
- go get -v github.com/go-critic/go-critic/...
- go get -v github.com/fzipp/gocyclo
- go get -v github.com/gordonklaus/ineffassign
- lintpack build -o $GOPATH/bin/gocritic -linter.name='gocritic' github.com/go-critic/go-critic/checkers

script:
- make test

after_success:
- goveralls -coverprofile=./coverage/cover.out -service=travis-ci
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# IMGVips
[![Build Status](https://travis-ci.org/Arimeka/imgvips.svg?branch=master)](https://travis-ci.org/Arimeka/imgvips)
[![Coverage Status](https://coveralls.io/repos/github/Arimeka/imgvips/badge.svg?branch=master)](https://coveralls.io/github/Arimeka/imgvips?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/Arimeka/imgvips)](https://goreportcard.com/report/github.com/Arimeka/imgvips)
[![GoDoc](https://godoc.org/github.com/Arimeka/imgvips?status.svg)](https://godoc.org/github.com/Arimeka/imgvips)

Low-level bindings for [libvips](https://github.com/libvips/libvips). For better shooting to the leg.

Expand Down
3 changes: 1 addition & 2 deletions argument.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package imgvips

/*
#cgo pkg-config: vips
#include "vips/vips.h"
#include "stdlib.h"
*/
import "C"

Expand Down
1 change: 1 addition & 0 deletions examples/resize/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

/*
#cgo pkg-config: vips
#include "stdlib.h"
#include "vips/vips.h"
*/
import "C"
Expand Down
1 change: 1 addition & 0 deletions operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package imgvips

/*
#cgo pkg-config: vips
#include "stdlib.h"
#include "vips/vips.h"
*/
import "C"
Expand Down
13 changes: 0 additions & 13 deletions operation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,6 @@ func BenchmarkOperation_Exec(b *testing.B) {
b.Fatalf("Unexpected error %v", err)
}

image, ok = resizeOut.Image()
if !ok {
op.Free()
resizeOp.Free()
b.Fatalf("Expected *C.VipsImage in out")
}

saveOp, err := imgvips.NewOperation("pngsave")
if err != nil {
op.Free()
Expand Down Expand Up @@ -250,12 +243,6 @@ func ExampleOperation_Exec() {
return
}

image, ok = resizeOut.Image()
if !ok {
log.Println(errors.New("resizeOut is not *C.VipsImage"))
return
}

saveOp, err := imgvips.NewOperation("webpsave")
if err != nil {
log.Println(err)
Expand Down
3 changes: 3 additions & 0 deletions scripts/linter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ echo
echo "==> Running gocritic <=="
gocritic check ./... || exit_code=1
echo
echo "==> Running ineffassign <=="
ineffassign ./* || exit_code=1
echo
echo "==> Running gocyclo <=="
gocyclo -over 10 . || exit_code=1

Expand Down
3 changes: 0 additions & 3 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

echo
echo "==> Running go test <=="
if [ $(uname) == "Linux" ]; then
go test -msan ./... || exit_code=1
fi
go test -cover -race -coverprofile=cover.out -outputdir=coverage ./... || exit_code=1
echo
echo "==> Running coverage <=="
Expand Down
1 change: 1 addition & 0 deletions value.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package imgvips

/*
#cgo pkg-config: vips
#include "stdlib.h"
#include "vips/vips.h"
*/
import "C"
Expand Down