From 04274be12945a9e1a03fb3cc141e65d043cb04cd Mon Sep 17 00:00:00 2001 From: Jan Delgado Date: Sat, 5 Oct 2019 00:24:15 +0200 Subject: [PATCH] update docs --- README.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5d5c1dd..1bba393 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,13 @@ No outputs. ## Example usage ```yaml -uses: jandelgado/gcov2lcov-action@v1 +uses: jandelgado/gcov2lcov-action@v1.0.0 with: infile: coverage.out outfile: coverage.lcov ``` -### Full workflow example +### Full example ```yaml coverage: @@ -40,18 +40,25 @@ with: go-version: 1.13.x - name: Checkout code uses: actions/checkout@v1 - - name: Calc coverage using action - uses: jandelgado/gcov2lcov-action@v1 + - name: Calc coverage + 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 with: - infile: coverage.out - outfile: coverage.lcov + infile: coverage.out + outfile: coverage.lcov - name: Coveralls uses: coverallsapp/github-action@v1.0.1 with: - github-token: ${{ secrets.github_token }} - path-to-lcov: coverage.lcov + github-token: ${{ secrets.github_token }} + path-to-lcov: coverage.lcov ``` +See also [example repository](https://github.com/jandelgado/golang-ci-template-github-actions). + + ## Author Copyright (C) 2019 Jan Delgado