From acffda121a4e621487be3fb0e8eb81032b1d4920 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Fri, 17 Mar 2023 11:03:24 +0300 Subject: [PATCH 1/2] feat: add format option --- README.md | 1 + action.yml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index a2db74d2..5414d5ea 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ The action's step needs to run after your test suite has outputted an LCOV file. | --------------------- | ----------- | ----------- | | `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)| | `file` | _optional_ | Default: all coverage files that could be found. Local path to the coverage report file produced by your test suite. An error will be thrown if no file was found. This is the file that will be sent to the Coveralls API. Leave empty if you want to combine many files reports. | +| `format` | _optional_ | Force file format. If not force, coveralls will try to detect the format based on file extension and/or content. Possible values: `lcov`, `simplecov`, `cobertura`, `jacoco`, `gcov`, `golang`, `python`. See also [actual supported coverage report formats list](https://github.com/coverallsapp/coverage-reporter#supported-coverage-report-formats). | | `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.*, ' - ') }}` | | `parallel-finished` | _optional_ | Set to true in the last job, after the other parallel jobs steps have completed, this will send a webhook to Coveralls to set the build complete. | diff --git a/action.yml b/action.yml index a04a3c54..c50929b5 100644 --- a/action.yml +++ b/action.yml @@ -13,6 +13,9 @@ inputs: file: description: 'Coverage file' required: false + format: + description: 'Force coverage format, supported formats: lcov, simplecov, cobertura, jacoco, gcov, golang, python' + required: false flag-name: description: 'Job flag name, e.g. "Unit", "Functional", or "Integration". Will be shown in the Coveralls UI.' required: false @@ -99,6 +102,7 @@ runs: ${{ inputs.debug == 'true' && '--debug' || '' }} ${{ inputs.base-path && format('--base-path {0}', inputs.base-path) || '' }} ${{ (inputs.file || inputs.path-to-lcov) && format('--file {0}', inputs.file || inputs.path-to-lcov) || '' }} + ${{ inputs.format && format('--format {0}', inputs.format) || '' }} env: COVERALLS_DEBUG: ${{ inputs.debug }} COVERALLS_CARRYFORWARD_FLAGS: ${{ inputs.carryforward }} From d1d0fda53210558508e9233f7d5e7aef3adfa626 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Fri, 17 Mar 2023 11:34:07 +0300 Subject: [PATCH 2/2] fix: typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5414d5ea..3998c89f 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The action's step needs to run after your test suite has outputted an LCOV file. | --------------------- | ----------- | ----------- | | `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)| | `file` | _optional_ | Default: all coverage files that could be found. Local path to the coverage report file produced by your test suite. An error will be thrown if no file was found. This is the file that will be sent to the Coveralls API. Leave empty if you want to combine many files reports. | -| `format` | _optional_ | Force file format. If not force, coveralls will try to detect the format based on file extension and/or content. Possible values: `lcov`, `simplecov`, `cobertura`, `jacoco`, `gcov`, `golang`, `python`. See also [actual supported coverage report formats list](https://github.com/coverallsapp/coverage-reporter#supported-coverage-report-formats). | +| `format` | _optional_ | Force coverage report file format. If not specified, coveralls will try to detect the format based on file extension and/or content. Possible values: `lcov`, `simplecov`, `cobertura`, `jacoco`, `gcov`, `golang`, `python`. See also [actual supported coverage report formats list](https://github.com/coverallsapp/coverage-reporter#supported-coverage-report-formats). | | `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.*, ' - ') }}` | | `parallel-finished` | _optional_ | Set to true in the last job, after the other parallel jobs steps have completed, this will send a webhook to Coveralls to set the build complete. |