gh-37: Add workflow file for Github Action (#38)

* Setting up Github Action

* remove Travis CI

* Update README.md
This commit is contained in:
Dong-hee Na 2019-12-06 15:36:49 +09:00 committed by GitHub
parent 8be960c20e
commit 3a999480e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 21 deletions

36
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,36 @@
on: [pull_request]
name: goimagehash workflow
jobs:
test:
strategy:
matrix:
go-version: [1.6.x, 1.7.x, 1.8.x, 1.9.x, 1.10.x, 1.11.x, 1.12.x, 1.13.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Set GOPATH
run: |
echo "##[set-env name=GOPATH;]$(dirname $GITHUB_WORKSPACE)"
id: gopath
- name: Checkout code
uses: actions/checkout@v1
with:
path: src/github.com/corona10/goimagehash
- name: Install
run: go get -t -v ./...
- name: Test and coverage
run: go test -coverprofile=coverage.txt -covermode=atomic
- name: Upload codecoverage to CodeCov
uses: codecov/codecov-action@v1.0.4
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.txt
flags: unittests

View File

@ -1,19 +0,0 @@
language: go
go:
- 1.6.x
- 1.7.x
- 1.8.x
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x
- 1.13.x
before_install:
- go get github.com/axw/gocov/gocov
- go get github.com/mattn/goveralls
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
script:
- $HOME/gopath/bin/goveralls -service=travis-ci

View File

@ -1,7 +1,5 @@
[![Build Status](https://travis-ci.org/corona10/goimagehash.svg?branch=master)](https://travis-ci.org/corona10/goimagehash)
[![GoDoc](https://godoc.org/github.com/corona10/goimagehash?status.svg)](https://godoc.org/github.com/corona10/goimagehash) [![GoDoc](https://godoc.org/github.com/corona10/goimagehash?status.svg)](https://godoc.org/github.com/corona10/goimagehash)
[![Go Report Card](https://goreportcard.com/badge/github.com/corona10/goimagehash)](https://goreportcard.com/report/github.com/corona10/goimagehash) [![Go Report Card](https://goreportcard.com/badge/github.com/corona10/goimagehash)](https://goreportcard.com/report/github.com/corona10/goimagehash)
[![Coverage Status](https://coveralls.io/repos/github/corona10/goimagehash/badge.svg)](https://coveralls.io/github/corona10/goimagehash)
# goimagehash # goimagehash
> Inspired by [imagehash](https://github.com/JohannesBuchner/imagehash) > Inspired by [imagehash](https://github.com/JohannesBuchner/imagehash)