-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add code coverage to blueprint-operator BOP-1133 (#100)
* Add code coverage to blueprint-operator BOP-1133 * Bump download artifact actions to v4 * Update baseline workflow to test.yml * Fix test artifact ref
- Loading branch information
Showing
9 changed files
with
78 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Code Coverage | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
artifact_url: | ||
description: 'url of coverage artifact' | ||
required: true | ||
type: string | ||
pr_number: | ||
description: 'Pull Request Number' | ||
required: true | ||
type: number | ||
|
||
jobs: | ||
code-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Code coverage Report | ||
uses: fgrosse/[email protected] | ||
id: report-step | ||
with: | ||
github-baseline-workflow-ref: test.yml | ||
root-package: github.com/mirantiscontainers/blueprint-operator/ | ||
skip-comment: true # Skip comment from this action since it fails due to permissions and use different action for comment instead | ||
- name: Find Comment | ||
uses: peter-evans/find-comment@v3 | ||
id: fc | ||
with: | ||
issue-number: ${{ inputs.pr_number }} | ||
comment-author: 'mirantiscontainers-bot' | ||
body-includes: Coverage Report | ||
- name: Comment on the PR | ||
uses: peter-evans/create-or-update-comment@v3 | ||
if: ${{ steps.report-step.outputs.coverage_report != '' }} | ||
with: | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
token: ${{ secrets.PAT_CI_BOUNDLESS }} | ||
issue-number: ${{ inputs.pr_number }} | ||
edit-mode: replace | ||
body: | | ||
[Coverage Report](${{ inputs.artifact_url }}) | ||
${{ steps.report-step.outputs.coverage_report }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters