diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 071db69..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: cimg/go:1.14 - steps: - - checkout - - run: go get -v -t -d ./... - - run: go get golang.org/x/tools/cmd/cover - - run: go get github.com/mattn/goveralls - - run: go test -v -covermode=count -coverprofile=coverage.out ./... - - run: goveralls -coverprofile=coverage.out -service=circle-ci -repotoken $COVERALLS_TOKEN diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..c00d0d1 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,41 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + go get -v -t -d ./... + + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + go get golang.org/x/tools/cmd/cover + go get github.com/mattn/goveralls + + - name: Test + run: go test -v -covermode=count -coverprofile=coverage.out ./... + + - name: Coveralls + run: goveralls -coverprofile=coverage.out -service=circle-ci -repotoken $COVERALLS_TOKEN \ No newline at end of file diff --git a/README.md b/README.md index b0d82c9..4b4aeed 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # gommunityid -[![CircleCI](https://circleci.com/gh/satta/gommunityid.svg?style=svg)](https://circleci.com/gh/satta/gommunityid) +[![Status](https://github.com/satta/gommunityid/actions/workflows/go.yml/badge.svg)](https://github.com/satta/gommunityid/actions) [![Coverage Status](https://coveralls.io/repos/github/satta/gommunityid/badge.svg?branch=master)](https://coveralls.io/github/satta/gommunityid?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/satta/gommunityid)](https://goreportcard.com/report/github.com/satta/gommunityid) [![Documentation](https://godoc.org/github.com/satta/gommunityid?status.svg)](http://godoc.org/github.com/satta/gommunityid)