mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2024-11-22 05:06:04 +03:00
Move CI to GitHub Actions (#21)
This commit is contained in:
parent
2f3b17ad07
commit
cc4e3b0957
36
.github/workflows/ci.yml
vendored
Normal file
36
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
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.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 10s -race -cover -coverprofile=coverage.txt -covermode=atomic
|
||||||
|
- name: Coverage
|
||||||
|
run: |
|
||||||
|
go get -v -u github.com/axw/gocov/gocov
|
||||||
|
gocov convert ./coverage.txt | gocov report
|
||||||
|
bash <(curl -s https://codecov.io/bash)
|
16
.travis.yml
16
.travis.yml
@ -1,16 +0,0 @@
|
|||||||
language: go
|
|
||||||
env:
|
|
||||||
- GO111MODULE=on
|
|
||||||
go:
|
|
||||||
- '1.12'
|
|
||||||
- '1.13'
|
|
||||||
- '1.14'
|
|
||||||
- '1.15'
|
|
||||||
before_install:
|
|
||||||
- go mod tidy
|
|
||||||
script:
|
|
||||||
- go test ./... -v -cpu 2 -timeout 10s -race -cover -coverprofile=coverage.txt -covermode=atomic
|
|
||||||
- go get -v -u github.com/axw/gocov/gocov
|
|
||||||
- gocov convert ./coverage.txt | gocov report
|
|
||||||
after_success:
|
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
|
@ -1,5 +1,5 @@
|
|||||||
## Message Gateway Transport Library
|
## Message Gateway Transport Library
|
||||||
[![Build Status](https://travis-ci.org/retailcrm/mg-transport-core.svg?branch=master)](https://travis-ci.org/retailcrm/mg-transport-core)
|
[![Build Status](https://github.com/retailcrm/mg-transport-core/workflows/ci/badge.svg)](https://github.com/retailcrm/mg-transport-core/actions?query=workflow%3Aci)
|
||||||
[![codecov](https://codecov.io/gh/retailcrm/mg-transport-core/branch/master/graph/badge.svg)](https://codecov.io/gh/retailcrm/mg-transport-core)
|
[![codecov](https://codecov.io/gh/retailcrm/mg-transport-core/branch/master/graph/badge.svg)](https://codecov.io/gh/retailcrm/mg-transport-core)
|
||||||
[![pkg.go.dev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/retailcrm/mg-transport-core/core)
|
[![pkg.go.dev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/retailcrm/mg-transport-core/core)
|
||||||
[![Go Report Card](https://goreportcard.com/badge/github.com/retailcrm/mg-transport-core)](https://goreportcard.com/report/github.com/retailcrm/mg-transport-core)
|
[![Go Report Card](https://goreportcard.com/badge/github.com/retailcrm/mg-transport-core)](https://goreportcard.com/report/github.com/retailcrm/mg-transport-core)
|
||||||
|
Loading…
Reference in New Issue
Block a user