mirror of
https://github.com/irongut/CodeCoverageSummary.git
synced 2026-05-14 06:00:13 +02:00
Compare commits
38 Commits
v1.2.0-beta
...
v1.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 51cc3a756d | |||
| df43d7d643 | |||
| 8accb9dd63 | |||
| 21fb9f6797 | |||
| 05b101a9e5 | |||
| 405344bb11 | |||
| 6575f73c8b | |||
| 9d67d209d5 | |||
| f055ebd021 | |||
| 5783d61eba | |||
| 7ede3df512 | |||
| 4149d3cd42 | |||
| e585016ed7 | |||
| 875e6d6260 | |||
| 8e03759e2f | |||
| 7cdc061845 | |||
| 4a8d89664f | |||
| 92459b634d | |||
| 7f81eacb3c | |||
| c34bdfe66a | |||
| 85a9fe6bb1 | |||
| 5b38ba1306 | |||
| 7b1923cbc6 | |||
| 1699cd4b65 | |||
| 4c876916c9 | |||
| 1c5e7f1a60 | |||
| 9196cf3448 | |||
| baf620bf17 | |||
| bc2adc7690 | |||
| ce279ec14b | |||
| 009a5455b8 | |||
| 0d078db7cc | |||
| 65684d3463 | |||
| a6a88c76f7 | |||
| 5088d5eb31 | |||
| ee53bdd6c5 | |||
| 6a542ff4b0 | |||
| 46bc9869d5 |
@@ -8,35 +8,46 @@ on:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
assign-to-project:
|
||||
permissions:
|
||||
repository-projects: write # for srggrs/assign-one-project-github-action to assign issues and PRs to repo project
|
||||
runs-on: ubuntu-latest
|
||||
name: Assign to Project
|
||||
steps:
|
||||
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- name: Assign Issues to Bugs
|
||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||
uses: srggrs/assign-one-project-github-action@4d59cc619499b55ca689fb13cfcc72324a8b8435
|
||||
if: contains(github.event.issue.labels.*.name, 'bug')
|
||||
with:
|
||||
project: 'https://github.com/irongut/EDlib/projects/1'
|
||||
project: 'https://github.com/irongut/CodeCoverageSummary/projects/1'
|
||||
column_name: 'Needs triage'
|
||||
|
||||
- name: Assign Issues to Enhancements
|
||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||
uses: srggrs/assign-one-project-github-action@4d59cc619499b55ca689fb13cfcc72324a8b8435
|
||||
if: contains(github.event.issue.labels.*.name, 'enhancement')
|
||||
with:
|
||||
project: 'https://github.com/irongut/EDlib/projects/2'
|
||||
project: 'https://github.com/irongut/CodeCoverageSummary/projects/2'
|
||||
column_name: 'To do'
|
||||
|
||||
- name: Assign PRs to Bugs
|
||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||
uses: srggrs/assign-one-project-github-action@4d59cc619499b55ca689fb13cfcc72324a8b8435
|
||||
if: contains(github.event.pull_request.labels.*.name, 'bug')
|
||||
with:
|
||||
project: 'https://github.com/irongut/EDlib/projects/1'
|
||||
project: 'https://github.com/irongut/CodeCoverageSummary/projects/1'
|
||||
column_name: 'In Progress'
|
||||
|
||||
- name: Assign PRs to Enhancements
|
||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||
uses: srggrs/assign-one-project-github-action@4d59cc619499b55ca689fb13cfcc72324a8b8435
|
||||
if: contains(github.event.pull_request.labels.*.name, 'enhancement')
|
||||
with:
|
||||
project: 'https://github.com/irongut/EDlib/projects/2'
|
||||
project: 'https://github.com/irongut/CodeCoverageSummary/projects/2'
|
||||
column_name: 'In Progress'
|
||||
|
||||
@@ -2,14 +2,22 @@
|
||||
# https://github.com/samspills/assign-pr-to-author
|
||||
|
||||
name: Auto Assign PR
|
||||
on: [pull_request]
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
assignAuthor:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- name: Auto Assign PR
|
||||
uses: samspills/assign-pr-to-author@v1.0.1
|
||||
if: github.event_name == 'pull_request' && github.event.action == 'opened'
|
||||
uses: samspills/assign-pr-to-author@223a87a821f7e7447cfb5221bc53ceeb633341c2
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
@@ -6,16 +6,25 @@ on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: CI Build
|
||||
steps:
|
||||
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@d171c3b028d844f2bf14e9fdec0c58114451e4bf
|
||||
|
||||
- name: Setup .Net
|
||||
uses: actions/setup-dotnet@v1
|
||||
uses: actions/setup-dotnet@608ee757cfcce72c2e91e99aca128e0cae67de87
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
@@ -26,4 +35,4 @@ jobs:
|
||||
run: dotnet build src/CodeCoverageSummary.sln --configuration Release --no-restore
|
||||
|
||||
- name: Test with sample file
|
||||
run: dotnet src/CodeCoverageSummary/bin/Release/net6.0/CodeCoverageSummary.dll --files src/coverage.cobertura.xml --badge true
|
||||
run: dotnet src/CodeCoverageSummary/bin/Release/net6.0/CodeCoverageSummary.dll --files **/coverage.*.xml --badge true
|
||||
|
||||
@@ -4,14 +4,25 @@ on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
permissions:
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale PRs
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- name: Mark Stale
|
||||
uses: actions/stale@v3
|
||||
uses: actions/stale@98ed4cb500039dbcccf4bd9bedada4d0187f2757
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
exempt-all-milestones: true
|
||||
|
||||
@@ -7,10 +7,22 @@ name: PR Labeler
|
||||
on:
|
||||
pull_request_target:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
label:
|
||||
permissions:
|
||||
contents: read # for actions/labeler to determine modified files
|
||||
pull-requests: write # for actions/labeler to add labels to PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v3
|
||||
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/labeler@472c5d3aaacde439785e94966eb2e545627f4935
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
@@ -8,18 +8,27 @@ env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@d171c3b028d844f2bf14e9fdec0c58114451e4bf
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup .Net
|
||||
uses: actions/setup-dotnet@v1
|
||||
uses: actions/setup-dotnet@608ee757cfcce72c2e91e99aca128e0cae67de87
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
@@ -30,7 +39,7 @@ jobs:
|
||||
run: dotnet build src/CodeCoverageSummary.sln --configuration Release --no-restore
|
||||
|
||||
- name: Test with sample file
|
||||
run: dotnet src/CodeCoverageSummary/bin/Release/net6.0/CodeCoverageSummary.dll --files src/coverage.cobertura.xml --badge true
|
||||
run: dotnet src/CodeCoverageSummary/bin/Release/net6.0/CodeCoverageSummary.dll --files **/coverage.*.xml --badge true
|
||||
|
||||
deploy:
|
||||
name: Deploy to GHCR
|
||||
@@ -39,12 +48,28 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write # Used for identity challenge with sigstore/fulcio
|
||||
|
||||
steps:
|
||||
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@d171c3b028d844f2bf14e9fdec0c58114451e4bf
|
||||
|
||||
- name: Install Cosign
|
||||
uses: sigstore/cosign-installer@c68f43abf1ae5df2528c9c250088fa14ed2d0ef5
|
||||
with:
|
||||
cosign-release: 'v1.9.0'
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.repository_owner }}
|
||||
@@ -52,14 +77,23 @@ jobs:
|
||||
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
uses: docker/metadata-action@b2391d37b4157fa4aa2e118d643f417910ff3242
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build + Push Docker image
|
||||
uses: docker/build-push-action@v2
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
# Sign the Docker image digest
|
||||
# Uses the identity token to provision an ephemeral certificate against the community Fulcio instance
|
||||
# https://github.com/sigstore/cosign
|
||||
- name: Sign the Docker image
|
||||
env:
|
||||
COSIGN_EXPERIMENTAL: "true"
|
||||
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
|
||||
|
||||
@@ -10,11 +10,19 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: CI Build
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Test Action
|
||||
uses: irongut/CodeCoverageSummary@master
|
||||
with:
|
||||
filename: '/app/sample.coverage.xml'
|
||||
filename: /src/coverage.*.xml
|
||||
badge: true
|
||||
format: 'md'
|
||||
fail_below_min: true
|
||||
format: markdown
|
||||
hide_branch_rate: false
|
||||
hide_complexity: true
|
||||
indicators: true
|
||||
output: both
|
||||
thresholds: '60 80'
|
||||
|
||||
@@ -14,5 +14,12 @@ jobs:
|
||||
- name: Test Action
|
||||
uses: irongut/CodeCoverageSummary@master
|
||||
with:
|
||||
filename: '/app/sample.coverage.xml'
|
||||
badge: 'true'
|
||||
filename: /app/sample.coverage.xml,/app/sample.coverage.xml
|
||||
badge: true
|
||||
fail_below_min: true
|
||||
format: markdown
|
||||
hide_branch_rate: false
|
||||
hide_complexity: true
|
||||
indicators: true
|
||||
output: both
|
||||
thresholds: '60 80'
|
||||
|
||||
@@ -14,5 +14,12 @@ jobs:
|
||||
- name: Test Action
|
||||
uses: irongut/CodeCoverageSummary@master
|
||||
with:
|
||||
filename: '/app/sample.coverage.xml'
|
||||
badge: 'true'
|
||||
filename: /app/sample.coverage.xml,/app/sample.coverage.xml
|
||||
badge: true
|
||||
fail_below_min: true
|
||||
format: markdown
|
||||
hide_branch_rate: false
|
||||
hide_complexity: true
|
||||
indicators: true
|
||||
output: both
|
||||
thresholds: '60 80'
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
|
||||
A GitHub Action that reads Cobertura format code coverage files from your test suite and outputs a text or markdown summary. This summary can be posted as a Pull Request comment or included in Release Notes by other actions to give you an immediate insight into the health of your code without using a third-party site.
|
||||
|
||||
Code Coverage Summary is designed for use with [Coverlet](https://github.com/coverlet-coverage/coverlet) and [gcovr](https://github.com/gcovr/gcovr) but it should work with any test framework that outputs coverage in Cobertura format. If it doesn't work with your tooling please [open an issue][new-issue] to discuss the problem.
|
||||
Code Coverage Summary is designed for use with any test framework that outputs coverage in Cobertura XML format including [Coverlet](https://github.com/coverlet-coverage/coverlet), [gcovr](https://github.com/gcovr/gcovr), [simplecov](https://github.com/simplecov-ruby/simplecov) and [MATLAB](https://uk.mathworks.com/help/matlab/ref/matlab.unittest.plugins.codecoverageplugin-class.html). See the [FAQ](https://github.com/irongut/CodeCoverageSummary/wiki/Frequently-Asked-Questions#which-testing-tools-does-ccs-work-with) for more details. If it doesn't work with your tooling please [open an issue][new-issue] to discuss the problem.
|
||||
|
||||
Code Coverage Summary is compatible with [StepSecurity Secure Workflows](https://github.com/step-security/secure-workflows) and uses a Docker image that is cryptographically signed using [Sigstore](https://www.sigstore.dev/). For instructions how to verify the Docker image please see the [Wiki](https://github.com/irongut/CodeCoverageSummary/wiki/Verify-the-Docker-Image).
|
||||
|
||||
As a Docker based action Code Coverage Summary requires a Linux runner, see [Types of Action](https://docs.github.com/en/actions/creating-actions/about-custom-actions#types-of-actions). If you need to build with a Windows or MacOS runner a workaround would be to upload the coverage file as an artifact and use a separate job with a Linux runner to generate the summary.
|
||||
|
||||
@@ -24,11 +26,9 @@ As a Docker based action Code Coverage Summary requires a Linux runner, see [Typ
|
||||
### `filename`
|
||||
**Required**
|
||||
|
||||
Code coverage file to analyse.
|
||||
A comma separated list of code coverage files to analyse. Also supports using glob patterns to match multiple files. If there are any spaces in a path or filename this value must be in quotes.
|
||||
|
||||
**v1.2.0-beta only:** A comma separated list of code coverage files to analyse.
|
||||
|
||||
Note: Coverlet creates the coverage file in a random named directory (guid) so you need to copy it to a predictable path before running this Action, see the [.Net 5 Workflow Example](#net-5-workflow-example) below.
|
||||
Note: Coverlet creates the coverage file in a random named directory (guid) so you need to copy it to a predictable path before running this Action, see the [.Net Workflow Example](#net-workflow-example) below.
|
||||
|
||||
|
||||
### `badge`
|
||||
@@ -55,15 +55,13 @@ Output Format - `markdown` or `text` (default).
|
||||
|
||||
|
||||
### `hide_branch_rate`
|
||||
**v1.2.0-beta only**
|
||||
|
||||
Hide Branch Rate values in the output - `true` or `false` (default).
|
||||
Hide Branch Rate metrics in the output - `true` or `false` (default).
|
||||
|
||||
|
||||
### `hide_complexity`
|
||||
**v1.2.0-beta only**
|
||||
|
||||
Hide Complexity values in the output - `true` or `false` (default).
|
||||
Hide Complexity metrics in the output - `true` or `false` (default).
|
||||
|
||||
|
||||
### `indicators`
|
||||
@@ -117,22 +115,24 @@ Minimum allowed line rate is 50%
|
||||
> Company.Example | 83% | 69% | 671 | ✔
|
||||
> Company.Example.Library | 27% | 100% | 11 | ❌
|
||||
> **Summary** | **83%** (1212 / 1460) | **69%** (262 / 378) | 682 | ✔
|
||||
>
|
||||
> _Minimum allowed line rate is `50%`_
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```yaml
|
||||
name: Code Coverage Summary Report
|
||||
uses: irongut/CodeCoverageSummary@v1.1.0
|
||||
uses: irongut/CodeCoverageSummary@v1.3.0
|
||||
with:
|
||||
filename: coverage/coverage.cobertura.xml
|
||||
filename: coverage.cobertura.xml
|
||||
```
|
||||
|
||||
|
||||
### .Net 5 Workflow Example
|
||||
### .Net Workflow Example
|
||||
|
||||
```yaml
|
||||
name: .Net 5 CI Build
|
||||
name: .Net 6 CI Build
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -151,7 +151,7 @@ jobs:
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
- name: Restore Dependencies
|
||||
run: dotnet restore src/Example.sln
|
||||
@@ -163,17 +163,20 @@ jobs:
|
||||
run: dotnet test src/Example.sln --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
|
||||
|
||||
- name: Copy Coverage To Predictable Location
|
||||
run: cp coverage/**/coverage.cobertura.xml coverage/coverage.cobertura.xml
|
||||
run: cp coverage/**/coverage.cobertura.xml coverage.cobertura.xml
|
||||
|
||||
- name: Code Coverage Summary Report
|
||||
uses: irongut/CodeCoverageSummary@v1.1.0
|
||||
uses: irongut/CodeCoverageSummary@v1.3.0
|
||||
with:
|
||||
filename: coverage/coverage.cobertura.xml
|
||||
filename: coverage.cobertura.xml
|
||||
badge: true
|
||||
fail_below_min: true
|
||||
format: 'markdown'
|
||||
output: 'both'
|
||||
thresholds: '70 80'
|
||||
format: markdown
|
||||
hide_branch_rate: false
|
||||
hide_complexity: true
|
||||
indicators: true
|
||||
output: both
|
||||
thresholds: '60 80'
|
||||
|
||||
- name: Add Coverage PR Comment
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
@@ -184,6 +187,16 @@ jobs:
|
||||
```
|
||||
|
||||
|
||||
## Version Numbers
|
||||
|
||||
Version numbers will be assigned according to the [Semantic Versioning](https://semver.org/) scheme.
|
||||
This means, given a version number MAJOR.MINOR.PATCH, we will increment the:
|
||||
|
||||
1. MAJOR version when we make incompatible API changes
|
||||
2. MINOR version when we add functionality in a backwards compatible manner
|
||||
3. PATCH version when we make backwards compatible bug fixes
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
### Report Bugs
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Version | Supported
|
||||
------- | ------------------
|
||||
1.2.0 | :white_check_mark:
|
||||
1.2.0-beta | :x:
|
||||
1.1.0 | :x:
|
||||
1.1.0-beta| :x:
|
||||
1.0.x | :x:
|
||||
|
||||
Only the latest version is supported. If you find a security vulnerability in an eariler version please check it exists in the latest version before reporting.
|
||||
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please make sure the vulnerability is not already reported by searching existing [issues].
|
||||
|
||||
If you're unable to find an existing issue addressing the vulnerability please [open a new issue][new-issue].
|
||||
Be sure to include a title and clear description and as much relevant information as possible.
|
||||
Please tag the issue with the `Security` label.
|
||||
|
||||
|
||||
[issues]: https://github.com/irongut/CodeCoverageSummary/issues
|
||||
[new-issue]: https://github.com/irongut/CodeCoverageSummary/issues/new
|
||||
+2
-2
@@ -6,7 +6,7 @@ branding:
|
||||
color: purple
|
||||
inputs:
|
||||
filename:
|
||||
description: 'A comma separated list of code coverage files to analyse.'
|
||||
description: 'A comma separated list of code coverage files to analyse. Also supports using glob patterns to match multiple files.'
|
||||
required: true
|
||||
badge:
|
||||
description: 'Include a Line Rate coverage badge in the output using shields.io - true / false (default).'
|
||||
@@ -42,7 +42,7 @@ inputs:
|
||||
default: '50 75'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'docker://ghcr.io/irongut/codecoveragesummary:v1.2.0-beta'
|
||||
image: 'docker://ghcr.io/irongut/codecoveragesummary:v1.3.0'
|
||||
args:
|
||||
- '--files'
|
||||
- ${{ inputs.filename }}
|
||||
|
||||
@@ -7,19 +7,20 @@
|
||||
<Company>Taranis Software</Company>
|
||||
<Authors>Irongut</Authors>
|
||||
<Description>A GitHub Action that reads Cobertura format code coverage files and outputs a text or markdown summary.</Description>
|
||||
<Copyright>Copyright © 2021 Taranis Software</Copyright>
|
||||
<Copyright>Copyright © 2021 - 2022 Taranis Software</Copyright>
|
||||
<PackageId>Taranis.CodeCoverageSummary</PackageId>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://github.com/irongut/CodeCoverageSummary</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/irongut/CodeCoverageSummary</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageTags>coverage test-coverage cobertura action code-coverage coverlet github-actions</PackageTags>
|
||||
<Version>1.2.0</Version>
|
||||
<Version>1.3.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser" Version="2.8.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
|
||||
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.16.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace CodeCoverageSummary
|
||||
{
|
||||
public class CommandLineOptions
|
||||
{
|
||||
[Option(longName: "files", Separator = ',', Required = true, HelpText = "A comma separated list of code coverage files to analyse.")]
|
||||
[Option(longName: "files", Separator = ',', Required = true, HelpText = "A comma separated list of code coverage files to analyse. Also accepts glob patterns.")]
|
||||
public IEnumerable<string> Files { get; set; }
|
||||
|
||||
[Option(longName: "badge", Required = false, HelpText = "Include a Line Rate coverage badge in the output using shields.io - true or false.", Default = "false")]
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using CommandLine;
|
||||
using Microsoft.Extensions.FileSystemGlobbing;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -19,33 +21,53 @@ namespace CodeCoverageSummary
|
||||
{
|
||||
try
|
||||
{
|
||||
// use glob patterns to match files
|
||||
Matcher matcher = new();
|
||||
matcher.AddIncludePatterns(o.Files.ToArray());
|
||||
IEnumerable<string> matchingFiles = matcher.GetResultsInFullPath(".");
|
||||
|
||||
if (matchingFiles?.Any() == false)
|
||||
{
|
||||
Console.WriteLine("Error: No files found matching glob pattern.");
|
||||
return -2; // error
|
||||
}
|
||||
|
||||
// check files exist
|
||||
foreach (var file in o.Files)
|
||||
foreach (var file in matchingFiles)
|
||||
{
|
||||
if (!File.Exists(file))
|
||||
{
|
||||
Console.WriteLine($"Error: Code coverage file not found - {file}.");
|
||||
Console.WriteLine($"Error: Coverage file not found - {file}.");
|
||||
return -2; // error
|
||||
}
|
||||
}
|
||||
|
||||
// parse code coverage file
|
||||
CodeSummary summary = new();
|
||||
foreach (var file in o.Files)
|
||||
foreach (var file in matchingFiles)
|
||||
{
|
||||
Console.WriteLine($"Code Coverage File: {file}");
|
||||
Console.WriteLine($"Coverage File: {file}");
|
||||
summary = ParseTestResults(file, summary);
|
||||
}
|
||||
summary.LineRate /= o.Files.Count();
|
||||
summary.BranchRate /= o.Files.Count();
|
||||
|
||||
if (summary == null)
|
||||
return -2; // error
|
||||
|
||||
summary.LineRate /= matchingFiles.Count();
|
||||
summary.BranchRate /= matchingFiles.Count();
|
||||
|
||||
if (summary.Packages.Count == 0)
|
||||
{
|
||||
Console.WriteLine("Error: Parsing code coverage file, no packages found.");
|
||||
Console.WriteLine("Parsing Error: No packages found in coverage files.");
|
||||
return -2; // error
|
||||
}
|
||||
else
|
||||
{
|
||||
// hide branch rate if metrics missing
|
||||
bool hideBranchRate = o.HideBranchRate;
|
||||
if (summary.BranchRate == 0 && summary.BranchesCovered == 0 && summary.BranchesValid == 0)
|
||||
hideBranchRate = true;
|
||||
|
||||
// set health badge thresholds
|
||||
if (!string.IsNullOrWhiteSpace(o.Thresholds))
|
||||
SetThresholds(o.Thresholds);
|
||||
@@ -59,14 +81,14 @@ namespace CodeCoverageSummary
|
||||
if (o.Format.Equals("text", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
fileExt = "txt";
|
||||
output = GenerateTextOutput(summary, badgeUrl, o.Indicators, o.HideBranchRate, o.HideComplexity);
|
||||
output = GenerateTextOutput(summary, badgeUrl, o.Indicators, hideBranchRate, o.HideComplexity);
|
||||
if (o.FailBelowThreshold)
|
||||
output += $"Minimum allowed line rate is {lowerThreshold * 100:N0}%{Environment.NewLine}";
|
||||
}
|
||||
else if (o.Format.Equals("md", StringComparison.OrdinalIgnoreCase) || o.Format.Equals("markdown", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
fileExt = "md";
|
||||
output = GenerateMarkdownOutput(summary, badgeUrl, o.Indicators, o.HideBranchRate, o.HideComplexity);
|
||||
output = GenerateMarkdownOutput(summary, badgeUrl, o.Indicators, hideBranchRate, o.HideComplexity);
|
||||
if (o.FailBelowThreshold)
|
||||
output += $"{Environment.NewLine}_Minimum allowed line rate is `{lowerThreshold * 100:N0}%`_{Environment.NewLine}";
|
||||
}
|
||||
@@ -79,6 +101,7 @@ namespace CodeCoverageSummary
|
||||
// output
|
||||
if (o.Output.Equals("console", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
Console.WriteLine();
|
||||
Console.WriteLine(output);
|
||||
}
|
||||
else if (o.Output.Equals("file", StringComparison.OrdinalIgnoreCase))
|
||||
@@ -87,6 +110,7 @@ namespace CodeCoverageSummary
|
||||
}
|
||||
else if (o.Output.Equals("both", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
Console.WriteLine();
|
||||
Console.WriteLine(output);
|
||||
File.WriteAllText($"code-coverage-results.{fileExt}", output);
|
||||
}
|
||||
@@ -116,6 +140,9 @@ namespace CodeCoverageSummary
|
||||
|
||||
private static CodeSummary ParseTestResults(string filename, CodeSummary summary)
|
||||
{
|
||||
if (summary == null)
|
||||
return null;
|
||||
|
||||
try
|
||||
{
|
||||
string rss = File.ReadAllText(filename);
|
||||
@@ -125,49 +152,73 @@ namespace CodeCoverageSummary
|
||||
var coverage = from item in xdoc.Descendants("coverage")
|
||||
select item;
|
||||
|
||||
if (!coverage.Any())
|
||||
throw new Exception("Coverage file invalid, data not found");
|
||||
|
||||
var lineR = from item in coverage.Attributes()
|
||||
where item.Name == "line-rate"
|
||||
select item;
|
||||
|
||||
if (!lineR.Any())
|
||||
throw new Exception("Overall line rate not found");
|
||||
|
||||
summary.LineRate += double.Parse(lineR.First().Value);
|
||||
|
||||
var linesCovered = from item in coverage.Attributes()
|
||||
where item.Name == "lines-covered"
|
||||
select item;
|
||||
|
||||
if (!linesCovered.Any())
|
||||
throw new Exception("Overall lines covered not found");
|
||||
|
||||
summary.LinesCovered += int.Parse(linesCovered.First().Value);
|
||||
|
||||
var linesValid = from item in coverage.Attributes()
|
||||
where item.Name == "lines-valid"
|
||||
select item;
|
||||
|
||||
if (!linesValid.Any())
|
||||
throw new Exception("Overall lines valid not found");
|
||||
|
||||
summary.LinesValid += int.Parse(linesValid.First().Value);
|
||||
|
||||
var branchR = from item in coverage.Attributes()
|
||||
where item.Name == "branch-rate"
|
||||
select item;
|
||||
summary.BranchRate += double.Parse(branchR.First().Value);
|
||||
|
||||
var branchesCovered = from item in coverage.Attributes()
|
||||
where item.Name == "branches-covered"
|
||||
select item;
|
||||
summary.BranchesCovered += int.Parse(branchesCovered.First().Value);
|
||||
if (branchR.Any())
|
||||
{
|
||||
summary.BranchRate += double.TryParse(branchR.First().Value, out double bRate) ? bRate : 0;
|
||||
|
||||
var branchesValid = from item in coverage.Attributes()
|
||||
where item.Name == "branches-valid"
|
||||
select item;
|
||||
summary.BranchesValid += int.Parse(branchesValid.First().Value);
|
||||
var branchesCovered = from item in coverage.Attributes()
|
||||
where item.Name == "branches-covered"
|
||||
select item;
|
||||
|
||||
summary.BranchesCovered += int.TryParse(branchesCovered?.First().Value ?? "0", out int bCovered) ? bCovered : 0;
|
||||
|
||||
var branchesValid = from item in coverage.Attributes()
|
||||
where item.Name == "branches-valid"
|
||||
select item;
|
||||
|
||||
summary.BranchesValid += int.TryParse(branchesValid?.First().Value ?? "0", out int bValid) ? bValid : 0;
|
||||
}
|
||||
|
||||
// test coverage for individual packages
|
||||
var packages = from item in coverage.Descendants("package")
|
||||
select item;
|
||||
|
||||
if (!packages.Any())
|
||||
throw new Exception("No package data found");
|
||||
|
||||
int i = 1;
|
||||
foreach (var item in packages)
|
||||
{
|
||||
CodeCoverage packageCoverage = new()
|
||||
{
|
||||
Name = string.IsNullOrWhiteSpace(item.Attribute("name").Value) ? $"Package {i}" : item.Attribute("name").Value,
|
||||
Name = string.IsNullOrWhiteSpace(item.Attribute("name")?.Value) ? $"{Path.GetFileNameWithoutExtension(filename)} Package {i}" : item.Attribute("name").Value,
|
||||
LineRate = double.Parse(item.Attribute("line-rate")?.Value ?? "0"),
|
||||
BranchRate = double.Parse(item.Attribute("branch-rate")?.Value ?? "0"),
|
||||
Complexity = double.Parse(item.Attribute("complexity")?.Value ?? "0")
|
||||
BranchRate = double.TryParse(item.Attribute("branch-rate")?.Value ?? "0", out double bRate) ? bRate : 0,
|
||||
Complexity = double.TryParse(item.Attribute("complexity")?.Value ?? "0", out double complex) ? complex : 0
|
||||
};
|
||||
summary.Packages.Add(packageCoverage);
|
||||
summary.Complexity += packageCoverage.Complexity;
|
||||
@@ -178,7 +229,7 @@ namespace CodeCoverageSummary
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Parse Error: {ex.Message}");
|
||||
Console.WriteLine($"Parsing Error: {ex.Message} - {filename}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -199,10 +250,10 @@ namespace CodeCoverageSummary
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!int.TryParse(thresholds.Substring(0, s), out lowerPercentage))
|
||||
if (!int.TryParse(thresholds.AsSpan(0, s), out lowerPercentage))
|
||||
throw new ArgumentException("Threshold parameter set incorrectly.");
|
||||
|
||||
if (!int.TryParse(thresholds.Substring(s + 1), out upperPercentage))
|
||||
if (!int.TryParse(thresholds.AsSpan(s + 1), out upperPercentage))
|
||||
throw new ArgumentException("Threshold parameter set incorrectly.");
|
||||
}
|
||||
lowerThreshold = lowerPercentage / 100.0;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"profiles": {
|
||||
"CodeCoverageSummary": {
|
||||
"commandName": "Project",
|
||||
"commandLineArgs": "--files ../../../../coverage.cobertura.xml,../../../../coverage.cobertura.xml --format=text --badge true --thresholds=\"85 90\" --fail true"
|
||||
"commandLineArgs": "--files **/coverage.*.xml --format=text --badge true --thresholds=\"85 90\" --fail true"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
|
||||
@@ -0,0 +1,441 @@
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
|
||||
<!-- Generated by simplecov-cobertura version 2.1.0 (https://github.com/dashingrocket/simplecov-cobertura) -->
|
||||
<coverage line-rate="0.97" lines-covered="350" lines-valid="362" complexity="0" version="0" timestamp="1645060052">
|
||||
<sources>
|
||||
<source>/Users/pboling/src/my/oauth2</source>
|
||||
</sources>
|
||||
<packages>
|
||||
<package name="oauth2" line-rate="0.97" complexity="0">
|
||||
<classes>
|
||||
<class name="oauth2" filename="lib/oauth2.rb" line-rate="1.0" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="2" hits="1"/>
|
||||
<line number="3" hits="1"/>
|
||||
<line number="4" hits="1"/>
|
||||
<line number="5" hits="1"/>
|
||||
<line number="6" hits="1"/>
|
||||
<line number="7" hits="1"/>
|
||||
<line number="8" hits="1"/>
|
||||
<line number="9" hits="1"/>
|
||||
<line number="10" hits="1"/>
|
||||
<line number="11" hits="1"/>
|
||||
<line number="12" hits="1"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="access_token" filename="lib/oauth2/access_token.rb" line-rate="0.96" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="2" hits="1"/>
|
||||
<line number="3" hits="1"/>
|
||||
<line number="4" hits="1"/>
|
||||
<line number="7" hits="1"/>
|
||||
<line number="13" hits="1"/>
|
||||
<line number="14" hits="7"/>
|
||||
<line number="15" hits="7"/>
|
||||
<line number="23" hits="1"/>
|
||||
<line number="24" hits="1"/>
|
||||
<line number="41" hits="1"/>
|
||||
<line number="42" hits="151"/>
|
||||
<line number="43" hits="151"/>
|
||||
<line number="44" hits="151"/>
|
||||
<line number="45" hits="151"/>
|
||||
<line number="46" hits="453"/>
|
||||
<line number="48" hits="151"/>
|
||||
<line number="49" hits="151"/>
|
||||
<line number="50" hits="151"/>
|
||||
<line number="51" hits="151"/>
|
||||
<line number="52" hits="151"/>
|
||||
<line number="55" hits="151"/>
|
||||
<line number="61" hits="1"/>
|
||||
<line number="62" hits="6"/>
|
||||
<line number="68" hits="1"/>
|
||||
<line number="69" hits="11"/>
|
||||
<line number="75" hits="1"/>
|
||||
<line number="76" hits="3"/>
|
||||
<line number="83" hits="1"/>
|
||||
<line number="84" hits="2"/>
|
||||
<line number="86" hits="2"/>
|
||||
<line number="87" hits="2"/>
|
||||
<line number="88" hits="2"/>
|
||||
<line number="89" hits="2"/>
|
||||
<line number="90" hits="2"/>
|
||||
<line number="91" hits="2"/>
|
||||
<line number="97" hits="1"/>
|
||||
<line number="98" hits="1"/>
|
||||
<line number="107" hits="1"/>
|
||||
<line number="108" hits="20"/>
|
||||
<line number="109" hits="20"/>
|
||||
<line number="115" hits="1"/>
|
||||
<line number="116" hits="2"/>
|
||||
<line number="122" hits="1"/>
|
||||
<line number="123" hits="18"/>
|
||||
<line number="129" hits="1"/>
|
||||
<line number="130" hits="2"/>
|
||||
<line number="136" hits="1"/>
|
||||
<line number="137" hits="0"/>
|
||||
<line number="143" hits="1"/>
|
||||
<line number="144" hits="2"/>
|
||||
<line number="148" hits="1"/>
|
||||
<line number="149" hits="8"/>
|
||||
<line number="152" hits="1"/>
|
||||
<line number="154" hits="1"/>
|
||||
<line number="155" hits="20"/>
|
||||
<line number="157" hits="8"/>
|
||||
<line number="158" hits="8"/>
|
||||
<line number="160" hits="8"/>
|
||||
<line number="161" hits="8"/>
|
||||
<line number="163" hits="4"/>
|
||||
<line number="164" hits="4"/>
|
||||
<line number="165" hits="4"/>
|
||||
<line number="167" hits="0"/>
|
||||
<line number="171" hits="0"/>
|
||||
<line number="175" hits="1"/>
|
||||
<line number="176" hits="13"/>
|
||||
<line number="178" hits="12"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="authenticator" filename="lib/oauth2/authenticator.rb" line-rate="1.0" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="3" hits="1"/>
|
||||
<line number="4" hits="1"/>
|
||||
<line number="5" hits="1"/>
|
||||
<line number="7" hits="1"/>
|
||||
<line number="8" hits="106"/>
|
||||
<line number="9" hits="106"/>
|
||||
<line number="10" hits="106"/>
|
||||
<line number="22" hits="1"/>
|
||||
<line number="23" hits="106"/>
|
||||
<line number="25" hits="14"/>
|
||||
<line number="27" hits="89"/>
|
||||
<line number="29" hits="1"/>
|
||||
<line number="31" hits="1"/>
|
||||
<line number="33" hits="1"/>
|
||||
<line number="37" hits="1"/>
|
||||
<line number="38" hits="15"/>
|
||||
<line number="41" hits="1"/>
|
||||
<line number="45" hits="1"/>
|
||||
<line number="46" hits="89"/>
|
||||
<line number="51" hits="1"/>
|
||||
<line number="52" hits="1"/>
|
||||
<line number="57" hits="1"/>
|
||||
<line number="58" hits="14"/>
|
||||
<line number="59" hits="14"/>
|
||||
<line number="60" hits="14"/>
|
||||
<line number="64" hits="1"/>
|
||||
<line number="65" hits="14"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="client" filename="lib/oauth2/client.rb" line-rate="0.95" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="2" hits="1"/>
|
||||
<line number="4" hits="1"/>
|
||||
<line number="6" hits="1"/>
|
||||
<line number="7" hits="1"/>
|
||||
<line number="9" hits="1"/>
|
||||
<line number="10" hits="1"/>
|
||||
<line number="11" hits="1"/>
|
||||
<line number="31" hits="1"/>
|
||||
<line number="32" hits="204"/>
|
||||
<line number="33" hits="204"/>
|
||||
<line number="34" hits="204"/>
|
||||
<line number="35" hits="204"/>
|
||||
<line number="36" hits="204"/>
|
||||
<line number="39" hits="204"/>
|
||||
<line number="49" hits="204"/>
|
||||
<line number="55" hits="1"/>
|
||||
<line number="56" hits="0"/>
|
||||
<line number="57" hits="0"/>
|
||||
<line number="61" hits="1"/>
|
||||
<line number="62" hits="423"/>
|
||||
<line number="63" hits="158"/>
|
||||
<line number="64" hits="158"/>
|
||||
<line number="65" hits="134"/>
|
||||
<line number="66" hits="134"/>
|
||||
<line number="69" hits="158"/>
|
||||
<line number="76" hits="1"/>
|
||||
<line number="77" hits="11"/>
|
||||
<line number="78" hits="11"/>
|
||||
<line number="84" hits="1"/>
|
||||
<line number="85" hits="100"/>
|
||||
<line number="100" hits="1"/>
|
||||
<line number="101" hits="141"/>
|
||||
<line number="103" hits="141"/>
|
||||
<line number="105" hits="141"/>
|
||||
<line number="106" hits="141"/>
|
||||
<line number="107" hits="141"/>
|
||||
<line number="109" hits="141"/>
|
||||
<line number="111" hits="141"/>
|
||||
<line number="113" hits="3"/>
|
||||
<line number="114" hits="3"/>
|
||||
<line number="115" hits="3"/>
|
||||
<line number="117" hits="2"/>
|
||||
<line number="118" hits="1"/>
|
||||
<line number="119" hits="1"/>
|
||||
<line number="121" hits="2"/>
|
||||
<line number="124" hits="127"/>
|
||||
<line number="126" hits="11"/>
|
||||
<line number="127" hits="11"/>
|
||||
<line number="129" hits="2"/>
|
||||
<line number="130" hits="2"/>
|
||||
<line number="132" hits="0"/>
|
||||
<line number="133" hits="0"/>
|
||||
<line number="143" hits="1"/>
|
||||
<line number="144" hits="97"/>
|
||||
<line number="145" hits="182"/>
|
||||
<line number="146" hits="2"/>
|
||||
<line number="148" hits="180"/>
|
||||
<line number="151" hits="97"/>
|
||||
<line number="153" hits="97"/>
|
||||
<line number="154" hits="97"/>
|
||||
<line number="155" hits="97"/>
|
||||
<line number="156" hits="97"/>
|
||||
<line number="157" hits="79"/>
|
||||
<line number="158" hits="79"/>
|
||||
<line number="160" hits="18"/>
|
||||
<line number="161" hits="18"/>
|
||||
<line number="163" hits="97"/>
|
||||
<line number="164" hits="97"/>
|
||||
<line number="167" hits="97"/>
|
||||
<line number="169" hits="0"/>
|
||||
<line number="172" hits="97"/>
|
||||
<line number="173" hits="3"/>
|
||||
<line number="174" hits="3"/>
|
||||
<line number="176" hits="94"/>
|
||||
<line number="182" hits="1"/>
|
||||
<line number="183" hits="48"/>
|
||||
<line number="189" hits="1"/>
|
||||
<line number="190" hits="5"/>
|
||||
<line number="196" hits="1"/>
|
||||
<line number="197" hits="11"/>
|
||||
<line number="203" hits="1"/>
|
||||
<line number="204" hits="21"/>
|
||||
<line number="207" hits="1"/>
|
||||
<line number="208" hits="9"/>
|
||||
<line number="227" hits="1"/>
|
||||
<line number="228" hits="55"/>
|
||||
<line number="229" hits="2"/>
|
||||
<line number="231" hits="53"/>
|
||||
<line number="235" hits="1"/>
|
||||
<line number="236" hits="91"/>
|
||||
<line number="237" hits="91"/>
|
||||
<line number="240" hits="1"/>
|
||||
<line number="242" hits="1"/>
|
||||
<line number="243" hits="97"/>
|
||||
<line number="244" hits="97"/>
|
||||
<line number="246" hits="93"/>
|
||||
<line number="250" hits="93"/>
|
||||
<line number="251" hits="1"/>
|
||||
<line number="253" hits="92"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="error" filename="lib/oauth2/error.rb" line-rate="1.0" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="2" hits="1"/>
|
||||
<line number="3" hits="1"/>
|
||||
<line number="7" hits="1"/>
|
||||
<line number="8" hits="14"/>
|
||||
<line number="9" hits="14"/>
|
||||
<line number="11" hits="14"/>
|
||||
<line number="12" hits="7"/>
|
||||
<line number="13" hits="7"/>
|
||||
<line number="14" hits="7"/>
|
||||
<line number="17" hits="14"/>
|
||||
<line number="23" hits="1"/>
|
||||
<line number="24" hits="14"/>
|
||||
<line number="26" hits="14"/>
|
||||
<line number="28" hits="14"/>
|
||||
<line number="29" hits="7"/>
|
||||
<line number="30" hits="7"/>
|
||||
<line number="32" hits="7"/>
|
||||
<line number="35" hits="14"/>
|
||||
<line number="37" hits="14"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="mac_token" filename="lib/oauth2/mac_token.rb" line-rate="0.95" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="2" hits="1"/>
|
||||
<line number="3" hits="1"/>
|
||||
<line number="4" hits="1"/>
|
||||
<line number="6" hits="1"/>
|
||||
<line number="7" hits="1"/>
|
||||
<line number="14" hits="1"/>
|
||||
<line number="15" hits="3"/>
|
||||
<line number="18" hits="1"/>
|
||||
<line number="30" hits="1"/>
|
||||
<line number="31" hits="19"/>
|
||||
<line number="32" hits="19"/>
|
||||
<line number="34" hits="18"/>
|
||||
<line number="43" hits="1"/>
|
||||
<line number="44" hits="4"/>
|
||||
<line number="46" hits="4"/>
|
||||
<line number="47" hits="4"/>
|
||||
<line number="49" hits="4"/>
|
||||
<line number="53" hits="1"/>
|
||||
<line number="54" hits="1"/>
|
||||
<line number="61" hits="1"/>
|
||||
<line number="62" hits="9"/>
|
||||
<line number="63" hits="9"/>
|
||||
<line number="65" hits="9"/>
|
||||
<line number="67" hits="8"/>
|
||||
<line number="69" hits="7"/>
|
||||
<line number="71" hits="7"/>
|
||||
<line number="80" hits="1"/>
|
||||
<line number="82" hits="8"/>
|
||||
<line number="91" hits="8"/>
|
||||
<line number="97" hits="1"/>
|
||||
<line number="98" hits="19"/>
|
||||
<line number="101" hits="1"/>
|
||||
<line number="103" hits="0"/>
|
||||
<line number="107" hits="17"/>
|
||||
<line number="109" hits="0"/>
|
||||
<line number="112" hits="1"/>
|
||||
<line number="116" hits="1"/>
|
||||
<line number="120" hits="1"/>
|
||||
<line number="124" hits="1"/>
|
||||
<line number="125" hits="8"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="response" filename="lib/oauth2/response.rb" line-rate="1.0" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="2" hits="1"/>
|
||||
<line number="3" hits="1"/>
|
||||
<line number="5" hits="1"/>
|
||||
<line number="7" hits="1"/>
|
||||
<line number="8" hits="1"/>
|
||||
<line number="9" hits="1"/>
|
||||
<line number="14" hits="62"/>
|
||||
<line number="15" hits="44"/>
|
||||
<line number="16" hits="3"/>
|
||||
<line number="20" hits="1"/>
|
||||
<line number="32" hits="1"/>
|
||||
<line number="33" hits="3"/>
|
||||
<line number="34" hits="3"/>
|
||||
<line number="35" hits="3"/>
|
||||
<line number="36" hits="6"/>
|
||||
<line number="46" hits="1"/>
|
||||
<line number="47" hits="147"/>
|
||||
<line number="48" hits="147"/>
|
||||
<line number="52" hits="1"/>
|
||||
<line number="53" hits="6"/>
|
||||
<line number="57" hits="1"/>
|
||||
<line number="58" hits="150"/>
|
||||
<line number="62" hits="1"/>
|
||||
<line number="63" hits="154"/>
|
||||
<line number="69" hits="1"/>
|
||||
<line number="70" hits="134"/>
|
||||
<line number="72" hits="131"/>
|
||||
<line number="76" hits="1"/>
|
||||
<line number="77" hits="244"/>
|
||||
<line number="81" hits="1"/>
|
||||
<line number="82" hits="244"/>
|
||||
<line number="84" hits="244"/>
|
||||
<line number="89" hits="1"/>
|
||||
<line number="90" hits="1"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="assertion" filename="lib/oauth2/strategy/assertion.rb" line-rate="0.89" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="3" hits="1"/>
|
||||
<line number="4" hits="1"/>
|
||||
<line number="23" hits="1"/>
|
||||
<line number="27" hits="1"/>
|
||||
<line number="28" hits="1"/>
|
||||
<line number="45" hits="1"/>
|
||||
<line number="46" hits="8"/>
|
||||
<line number="47" hits="8"/>
|
||||
<line number="50" hits="1"/>
|
||||
<line number="51" hits="8"/>
|
||||
<line number="53" hits="8"/>
|
||||
<line number="60" hits="1"/>
|
||||
<line number="62" hits="8"/>
|
||||
<line number="67" hits="8"/>
|
||||
<line number="68" hits="8"/>
|
||||
<line number="69" hits="0"/>
|
||||
<line number="70" hits="0"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="auth_code" filename="lib/oauth2/strategy/auth_code.rb" line-rate="1.0" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="2" hits="1"/>
|
||||
<line number="6" hits="1"/>
|
||||
<line number="10" hits="1"/>
|
||||
<line number="11" hits="3"/>
|
||||
<line number="17" hits="1"/>
|
||||
<line number="18" hits="3"/>
|
||||
<line number="27" hits="1"/>
|
||||
<line number="28" hits="44"/>
|
||||
<line number="30" hits="44"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="base" filename="lib/oauth2/strategy/base.rb" line-rate="1.0" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="2" hits="1"/>
|
||||
<line number="3" hits="1"/>
|
||||
<line number="4" hits="1"/>
|
||||
<line number="5" hits="95"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="client_credentials" filename="lib/oauth2/strategy/client_credentials.rb" line-rate="1.0" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="2" hits="1"/>
|
||||
<line number="6" hits="1"/>
|
||||
<line number="10" hits="1"/>
|
||||
<line number="11" hits="1"/>
|
||||
<line number="18" hits="1"/>
|
||||
<line number="19" hits="20"/>
|
||||
<line number="20" hits="20"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="implicit" filename="lib/oauth2/strategy/implicit.rb" line-rate="1.0" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="2" hits="1"/>
|
||||
<line number="6" hits="1"/>
|
||||
<line number="10" hits="1"/>
|
||||
<line number="11" hits="3"/>
|
||||
<line number="17" hits="1"/>
|
||||
<line number="18" hits="3"/>
|
||||
<line number="24" hits="1"/>
|
||||
<line number="25" hits="1"/>
|
||||
</lines>
|
||||
</class>
|
||||
<class name="password" filename="lib/oauth2/strategy/password.rb" line-rate="1.0" complexity="0">
|
||||
<methods/>
|
||||
<lines>
|
||||
<line number="1" hits="1"/>
|
||||
<line number="2" hits="1"/>
|
||||
<line number="6" hits="1"/>
|
||||
<line number="10" hits="1"/>
|
||||
<line number="11" hits="1"/>
|
||||
<line number="19" hits="1"/>
|
||||
<line number="20" hits="10"/>
|
||||
<line number="23" hits="10"/>
|
||||
</lines>
|
||||
</class>
|
||||
</classes>
|
||||
</package>
|
||||
</packages>
|
||||
</coverage>
|
||||
Reference in New Issue
Block a user