Skip to content

External PR

External PR #235

Workflow file for this run

name: External PR
on:
workflow_run:
workflows: ["CI with Maven"]
types:
- completed
jobs:
comment:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
name: Comment
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Download artifact'
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- run: unzip pr.zip
- name: outputs
run: |-
echo "PR=$(cat NR)" >> $GITHUB_ENV
echo "SHA=$(cat SHA)" >> $GITHUB_ENV
- name: cobertura-report-client-test
uses: 5monkeys/cobertura-action@v14
continue-on-error: true
with:
# The GITHUB_TOKEN for this repo
repo_token: ${{ github.token }}
# Path to the cobertura file.
path: client/jacoco-report/cobertura.xml
# If files with 100% should be skipped from report.
skip_covered: false
# Minimum allowed coverage percentage as an integer.
minimum_coverage: 65
# Show line rate as specific column.
show_line: true
# Show branch rate as specific column.
show_branch: true
# Use class names instead of the filename
show_class_names: true
# Use a unique name for the report and comment
report_name: Client Coverage Report
pull_request_number: ${{ env.PR }}
- name: cobertura-report-server-test
uses: 5monkeys/cobertura-action@v14
continue-on-error: true
with:
# The GITHUB_TOKEN for this repo
repo_token: ${{ github.token }}
# Path to the cobertura file.
path: server/jacoco-report/cobertura.xml
# If files with 100% should be skipped from report.
skip_covered: false
# Minimum allowed coverage percentage as an integer.
minimum_coverage: 58
# Show line rate as specific column.
show_line: true
# Show branch rate as specific column.
show_branch: true
# Use class names instead of the filename
show_class_names: true
# Use a unique name for the report and comment
report_name: Server Coverage Report
pull_request_number: ${{ env.PR }}