From 8aefee4a2271357be6745aeb44d2b1f915f31d58 Mon Sep 17 00:00:00 2001 From: yuin Date: Mon, 18 Nov 2019 15:20:39 +0900 Subject: [PATCH] migrate travisCI to Github actions --- .github/workflows/test.yaml | 33 +++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..979c9c3 --- /dev/null +++ b/.github/workflows/test.yaml @@ -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 diff --git a/README.md b/README.md index f2e0f12..d299a52 100644 --- a/README.md +++ b/README.md @@ -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)