generate lcov

This commit is contained in:
Miguel Savignano 2019-11-03 01:25:37 +01:00
parent 85221ddbbc
commit bb5d80096d
3 changed files with 15 additions and 4 deletions

View File

@ -15,6 +15,17 @@ A GitHub Action that check minimum coverage percentage!
min_coverage: 90
```
#### Lcov
```yml
- uses: devmasx/coverage-check-action@v1.0.1
with:
result_path: coverage/example.lcov
token: ${{secrets.GITHUB_TOKEN}}
type: lcov
min_coverage: 90
```
## Screenshots
![Success](./screenshots/success.png)

View File

@ -6,9 +6,9 @@ branding:
color: "green"
inputs:
type:
description: "simplecov | jest"
description: "lcov | simplecov"
required: true
default: "simplecov"
default: "lcov"
token:
description: "Github token for create checks"
required: true

View File

@ -5,8 +5,8 @@ class CoverageReport
def generate(type, report_path, data)
if type == 'simplecov'
simplecov(report_path, data)
elsif type == 'jest'
jest(report_path, data)
elsif type == 'lcov'
lcov(report_path, data)
else
raise 'InvalidCoverageReportType'
end