From c7b8cfcaa1fb19e652b05487d3c6b6aa0844fbeb Mon Sep 17 00:00:00 2001 From: hewig <360470+hewigovens@users.noreply.github.com> Date: Thu, 7 May 2020 07:08:19 +0800 Subject: [PATCH] Move CI to actions (#12) * Create ci.yml * update readme badge and remove travis --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ .travis.yml | 13 ------------- README.md | 2 +- 3 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0fbf93e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + unit-test: + 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 + uses: actions/checkout@v2 + + - name: Get dependencies + run: go get -v -t -d ./... + + - name: Test + run: go test -race -coverprofile=coverage.txt -covermode=atomic + + - name: Coverage + run: bash <(curl -s https://codecov.io/bash) diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3ca3185..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go - -go: - - "1.x" - -before_install: - - go get -t -v ./... - -script: - - go test -race -coverprofile=coverage.txt -covermode=atomic - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index 0870a77..aab7d82 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Tag](https://img.shields.io/github/tag/trustwallet/ens-coincodec.svg)](https://github.com/trustwallet/ens-coincodec/releases/) [![License](https://img.shields.io/github/license/trustwallet/ens-coincodec.svg)](LICENSE) [![GoDoc](https://godoc.org/github.com/trustwallet/ens-coincodec?status.svg)](https://godoc.org/github.com/trustwallet/ens-coincodec) -[![Build Status](https://travis-ci.org/trustwallet/ens-coincodec.svg?branch=master)](https://travis-ci.org/trustwallet/ens-coincodec) +![CI](https://github.com/trustwallet/ens-coincodec/workflows/CI/badge.svg) [![codecov.io](https://img.shields.io/codecov/c/github/trustwallet/ens-coincodec.svg)](https://codecov.io/github/trustwallet/ens-coincodec) [![Go Report](https://goreportcard.com/badge/github.com/trustwallet/ens-coincodec)](https://goreportcard.com/report/github.com/trustwallet/ens-coincodec)