Move CI to Github Actions (#65)
This commit is contained in:
parent
ba27daa885
commit
560d146b91
3 changed files with 38 additions and 18 deletions
33
.github/workflows/ci.yml
vendored
Normal file
33
.github/workflows/ci.yml
vendored
Normal file
|
@ -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)
|
14
.travis.yml
14
.travis.yml
|
@ -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)
|
|
|
@ -1,7 +1,8 @@
|
||||||
[](https://travis-ci.org/retailcrm/mg-transport-api-client-go)
|
[](https://github.com/retailcrm/mg-transport-api-client-go/actions)
|
||||||
[](https://github.com/retailcrm/mg-transport-api-client-go/releases)
|
[](https://codecov.io/gh/retailcrm/mg-transport-api-client-go)
|
||||||
[](https://golang.org/dl/)
|
[](https://github.com/retailcrm/mg-transport-api-client-go/releases)
|
||||||
[](https://godoc.org/github.com/retailcrm/mg-transport-api-client-go)
|
[](https://golang.org/dl/)
|
||||||
|
[](https://godoc.org/github.com/retailcrm/mg-transport-api-client-go)
|
||||||
|
|
||||||
|
|
||||||
# Message Gateway Transport API Go client
|
# Message Gateway Transport API Go client
|
||||||
|
|
Loading…
Add table
Reference in a new issue