diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml new file mode 100644 index 0000000..42d4e7e --- /dev/null +++ b/.github/workflows/unittests.yml @@ -0,0 +1,25 @@ +name: unittests + +on: + push: + pull_request: + types: [opened, reopened] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: ['1.19.x','1.20.x', '1.21.x'] + steps: + - uses: actions/checkout@v4 + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go-version }} + - name: tests + run: | + go install github.com/axw/gocov/gocov@latest + go install github.com/mattn/goveralls@latest + if ! go install github.com/golang/tools/cmd/cover@latest; then go install golang.org/x/tools/cmd/cover@latest; fi + go test -v -covermode=count -coverprofile=coverage.out diff --git a/.travis.sh b/.travis.sh deleted file mode 100644 index 992c794..0000000 --- a/.travis.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -gofmt_check() { - unformatted=$(gofmt -l .) - if [ -n "$unformatted" ]; then - echo "go fmt found problems with the following files:" - echo "$unformatted" - echo "Please check https://blog.golang.org/go-fmt-your-code :)" - return 1 - fi -} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c8f8bb6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: go -sudo: false -go: - - 1.4.3 - - 1.5.3 - - 1.6 - - 1.7 - - tip -install: - - source .travis.sh -before_script: - - 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: - - go test -v -covermode=count -coverprofile=coverage.out - - gofmt_check -after_success: - - $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci diff --git a/README.md b/README.md index 23ee7f7..351da26 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ gothumbor ========= -[![GoDoc](https://godoc.org/github.com/globocom/gothumbor?status.svg)](https://godoc.org/github.com/globocom/gothumbor) [![Build Status](https://travis-ci.org/globocom/gothumbor.svg?branch=master)](https://travis-ci.org/globocom/gothumbor) [![Coverage Status](https://coveralls.io/repos/globocom/gothumbor/badge.svg?branch=master&service=github)](https://coveralls.io/github/globocom/gothumbor?branch=master) +[![GoDoc](https://godoc.org/github.com/globocom/gothumbor?status.svg)](https://godoc.org/github.com/globocom/gothumbor) gothumbor allows easy usage of [Thumbor] in Go.