mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
migrate travisCI to Github actions
This commit is contained in:
parent
696c860a32
commit
8aefee4a22
2 changed files with 34 additions and 1 deletions
33
.github/workflows/test.yaml
vendored
Normal file
33
.github/workflows/test.yaml
vendored
Normal 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
|
||||
|
|
@ -2,7 +2,7 @@ goldmark
|
|||
==========================================
|
||||
|
||||
[](http://godoc.org/github.com/yuin/goldmark)
|
||||
[](https://travis-ci.org/yuin/goldmark)
|
||||
[](https://github.com/yuin/goldmark/actions?query=workflow:test)
|
||||
[](https://coveralls.io/r/yuin/goldmark)
|
||||
[](https://goreportcard.com/report/github.com/yuin/goldmark)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue