diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..0496a76 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: Main +on: [push, pull_request] +jobs: + test: + name: Test all + runs-on: ubuntu-latest + strategy: + matrix: + go: + - "1.5.x" + - "1.6.x" + - "1.7.x" + - "1.8.x" + - "1.9.x" + - "1.10.x" + - "1.11.x" + - "1.12.x" + steps: + - name: Set up Go + uses: actions/setup-go@v1.0.2 + with: + go-version: ${{matrix.go}} + env: + GOPATH: /home/runner # Fix for actions/setup-go@v1.0.2 + - name: Check out code + uses: actions/checkout@v1.0.0 + - name: Get modules + run: go get -v -t -d ./... + - name: Test + run: go test -v --coverprofile=cover.out ./... + - name: Upload coverage profile + uses: codecov/codecov-action@v1.0.2 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: cover.out diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 35ed5fc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: go - -matrix: - include: - - go: "1.2.x" - install: go get -t -v ./... - - go: "1.3.x" - - go: "1.4.x" - - go: "1.5.x" - - go: "1.6.x" - - go: "1.7.x" - - go: "1.8.x" - - go: "1.9.x" - - go: "1.10.x" - - go: "1.11.x" - env: GO111MODULE=on - - go: "1.12.x" - env: GO111MODULE=on - - go: "tip" - script: - - go test -v --coverprofile=cover.out ./... - - go get github.com/mattn/goveralls - - goveralls --coverprofile=cover.out --service=travis-ci diff --git a/README.md b/README.md index fa151d5..bfd8397 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # MIMESniffer -[![Build Status](https://travis-ci.org/aofei/mimesniffer.svg?branch=master)](https://travis-ci.org/aofei/mimesniffer) -[![Coverage Status](https://coveralls.io/repos/github/aofei/mimesniffer/badge.svg?branch=master)](https://coveralls.io/github/aofei/mimesniffer?branch=master) +[![codecov](https://codecov.io/gh/aofei/mimesniffer/branch/master/graph/badge.svg)](https://codecov.io/gh/aofei/mimesniffer) [![Go Report Card](https://goreportcard.com/badge/github.com/aofei/mimesniffer)](https://goreportcard.com/report/github.com/aofei/mimesniffer) [![GoDoc](https://godoc.org/github.com/aofei/mimesniffer?status.svg)](https://godoc.org/github.com/aofei/mimesniffer)