goldmark/.github/workflows/test.yaml
2019-11-18 15:23:32 +09:00

33 lines
994 B
YAML

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.platform == 'ubuntu-latest'"
with:
infile: coverage.out
outfile: coverage.lcov
- name: Coveralls
uses: coverallsapp/github-action@v1.0.1
if: "matrix.platform == 'ubuntu-latest'"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov