From 50c33ad324a9902697adbf2f92c22cf5023eacf1 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Wed, 1 Mar 2023 12:42:55 +0300 Subject: [PATCH] : Master docs: update README --- README.md | 14 +++++--------- action.yml | 1 + 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index fb4fb2fd..52372d7e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The action's step needs to run after your test suite has outputted an LCOV file. | Name | Requirement | Description | | --------------------- | ----------- | ----------- | -| `github-token` | _required_ | Must be in form `github-token: ${{ secrets.GITHUB_TOKEN }}`; Coveralls uses this token to verify the posted coverage data on the repo and create a new check based on the results. It is built into Github Actions and does not need to be manually specified in your secrets store. [More Info](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)| +| `github-token` | _optional_ | Default: `${{ github.token }}`. Can be also used this way: `github-token: ${{ secrets.GITHUB_TOKEN }}`; Coveralls uses this token to verify the posted coverage data on the repo and create a new check based on the results. It is built into Github Actions and does not need to be manually specified in your secrets store. [More Info](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)| | `path-to-lcov` | _optional_ | Default: "./coverage/lcov.info". Local path to the lcov output file produced by your test suite. An error will be thrown if the file can't be found. This is the file that will be sent to the Coveralls API. | | `flag-name` | _optional (unique required if parallel)_ | Job flag name, e.g. "Unit", "Functional", or "Integration". Will be shown in the Coveralls UI. | | `parallel` | _optional_ | Set to true for parallel (or matrix) based steps, where multiple posts to Coveralls will be performed in the check. `flag-name` needs to be set and unique, e.g. `flag-name: run ${{ join(matrix.*, ' - ') }}` | @@ -58,9 +58,7 @@ jobs: make test-coverage - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} + uses: coverallsapp/github-action@v1 ``` ### Complete Parallel Job Example: @@ -91,10 +89,9 @@ jobs: - name: Test ${{ matrix.test_number }} run: make test-coverage-${{ matrix.test_number }} - name: Coveralls Parallel - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@v1 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - flag-name: run ${{ join(matrix.*, ' - ') }} + flag-name: run-${{ join(matrix.*, '-') }} parallel: true finish: @@ -103,9 +100,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Coveralls Finished - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@v1 with: - github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true carryforward: "run-1,run-2" ``` diff --git a/action.yml b/action.yml index d40f24f0..b29befd2 100644 --- a/action.yml +++ b/action.yml @@ -5,6 +5,7 @@ author: 'Nick Merwin (Coveralls, Inc.)' inputs: github-token: description: 'Put secrets.GITHUB_TOKEN here' + required: false default: ${{ github.token }} path-to-lcov: description: 'Path to lcov file'