diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..1b13b32 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,30 @@ +name: Go + +on: + push: + branches: + - master + - main + pull_request: + branches: '*' + +jobs: + build: + strategy: + matrix: + go: ['1.16', '1.17'] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + - run: go mod download + - run: go build -v ./... + - run: go test -race -covermode atomic -coverprofile=covprofile ./... + - run: go install github.com/mattn/goveralls@latest + - name: Send coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: goveralls -coverprofile=covprofile -service=github diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 30bfc1b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: go -go: - - "1.8" - - "1.9" - - "1.10" - - "1.11" - - "1.12" - - "1.13" - - "1.14" - - tip -install: - - echo "Do Nothing, please" -script: - - go test -v . -after_success: - - go get github.com/mattn/goveralls - - go get github.com/axw/gocov/gocov - - go get code.google.com/p/go.tools/cmd/cover - - export PATH="$HOME/gopath/bin:$PATH" - - goveralls -package "github.com/woothee/woothee-go" -service=travis-ci diff --git a/README.md b/README.md index a8984be..8513914 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ go get github.com/woothee/woothee-go ## Running Tests ``` +go mod download go test -v ./... ``` diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..4986b5e --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/woothee/woothee-go + +go 1.17 + +require gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..7534661 --- /dev/null +++ b/go.sum @@ -0,0 +1,3 @@ +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=