migrate travisCI to Github actions

This commit is contained in:
yuin 2019-11-18 15:20:39 +09:00
parent 696c860a32
commit 8aefee4a22
2 changed files with 34 additions and 1 deletions

33
.github/workflows/test.yaml vendored Normal file
View file

@ -0,0 +1,33 @@
on: [push, pull_request]
name: test
jobs:
test:
strategy:
fail-fast: false
matrix:
go-version: [1.12.x, 1.13.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v1
- name: Run tests
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go test -v ./... -covermode=count -coverprofile=coverage.out
- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1.0.0
if: "matrix.os == 'ubuntu-latest'"
with:
infile: coverage.out
outfile: coverage.lcov
- name: Coveralls
uses: coverallsapp/github-action@v1.0.1
if: "matrix.os == 'ubuntu-latest'"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov

View file

@ -2,7 +2,7 @@ goldmark
==========================================
[![http://godoc.org/github.com/yuin/goldmark](https://godoc.org/github.com/yuin/goldmark?status.svg)](http://godoc.org/github.com/yuin/goldmark)
[![https://travis-ci.org/yuin/goldmark](https://travis-ci.org/yuin/goldmark.svg)](https://travis-ci.org/yuin/goldmark)
[![https://github.com/yuin/goldmark/actions?query=workflow:test](https://github.com/yuin/goldmark/workflows/test/badge.svg?branch=master)](https://github.com/yuin/goldmark/actions?query=workflow:test)
[![https://coveralls.io/r/yuin/goldmark](https://coveralls.io/repos/yuin/goldmark/badge.svg)](https://coveralls.io/r/yuin/goldmark)
[![https://goreportcard.com/report/github.com/yuin/goldmark](https://goreportcard.com/badge/github.com/yuin/goldmark)](https://goreportcard.com/report/github.com/yuin/goldmark)