diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..dd9415e --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,39 @@ +name: build + +on: [push,pull_request] + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.15 + + - 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 + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + - name: Bench + run: go test -v -run="none" -bench=. + + - name: Coverage + run: | + go test -coverprofile=coverage.txt -covermode=atomic + bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9c39c2b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: go -os: - - linux -go: - - 1.13 -install: - - go get -t -v -d ./... -script: - - go test -v . - - go test -race -coverprofile=coverage.txt -covermode=atomic -after_success: - - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/README.md b/README.md index 969411e..84d896e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ftok [![PkgGoDev](https://pkg.go.dev/badge/github.com/hslam/ftok)](https://pkg.go.dev/github.com/hslam/ftok) -[![Build Status](https://api.travis-ci.com/hslam/ftok.svg?branch=master)](https://travis-ci.com/hslam/ftok) +[![Build Status](https://github.com/hslam/ftok/workflows/build/badge.svg)](https://github.com/hslam/ftok/actions) [![codecov](https://codecov.io/gh/hslam/ftok/branch/master/graph/badge.svg)](https://codecov.io/gh/hslam/ftok) [![Go Report Card](https://goreportcard.com/badge/github.com/hslam/ftok)](https://goreportcard.com/report/github.com/hslam/ftok) [![LICENSE](https://img.shields.io/github/license/hslam/ftok.svg?style=flat-square)](https://github.com/hslam/ftok/blob/master/LICENSE)