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: go test -v -cover ./... -covermode=count -coverprofile=coverage.out -coverpkg=./... - 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