From 560d146b912c8abde74cc3bce23816ead3be1c87 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Thu, 26 Nov 2020 13:28:15 +0300 Subject: [PATCH] Move CI to Github Actions (#65) --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ .travis.yml | 14 -------------- README.md | 9 +++++---- 3 files changed, 38 insertions(+), 18 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..69756b4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: ci + +on: + push: + branches: + - '**' + tags-ignore: + - '*.*' + pull_request: + +env: + GO111MODULE: on + +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + strategy: + matrix: + go-version: ['1.11', '1.12', '1.13', '1.14', '1.15'] + steps: + - name: Set up Go ${{ matrix.go-version }} + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + - name: Get dependencies + run: go mod tidy + - name: Tests + run: go test ./... -v -cpu 2 -timeout 2m -race -cover -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 d2c303a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go -env: - - GO111MODULE=on -go: - - '1.11' - - '1.12' - - '1.13' - - '1.14' -before_install: - - go mod tidy -script: - - go test ./... -v -cpu 2 -timeout 2m -race -cover -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 d931473..0f3171e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ -[![Build Status](https://img.shields.io/travis/retailcrm/mg-transport-api-client-go/master.svg?logo=travis&style=flat-square)](https://travis-ci.org/retailcrm/mg-transport-api-client-go) -[![GitHub release](https://img.shields.io/github/release/retailcrm/mg-transport-api-client-go.svg?style=flat-square)](https://github.com/retailcrm/mg-transport-api-client-go/releases) -[![GoLang version](https://img.shields.io/badge/go-1.8%2C%201.9%2C%201.10%2C%201.11-blue.svg?style=flat-square)](https://golang.org/dl/) -[![Godoc reference](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/retailcrm/mg-transport-api-client-go) +[![Build Status](https://github.com/retailcrm/mg-transport-api-client-go/workflows/ci/badge.svg)](https://github.com/retailcrm/mg-transport-api-client-go/actions) +[![Coverage](https://img.shields.io/codecov/c/gh/retailcrm/mg-transport-api-client-go/master.svg?logo=codecov)](https://codecov.io/gh/retailcrm/mg-transport-api-client-go) +[![GitHub release](https://img.shields.io/github/release/retailcrm/mg-transport-api-client-go.svg)](https://github.com/retailcrm/mg-transport-api-client-go/releases) +[![GoLang version](https://img.shields.io/badge/go->=1.11-blue.svg)](https://golang.org/dl/) +[![Godoc reference](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/retailcrm/mg-transport-api-client-go) # Message Gateway Transport API Go client