forked from apache/incubator-kie-kogito-runtimes
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.55 KB
/
pr-surefire-report.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Surefire report
on:
workflow_run:
workflows: [Kogito Runtimes Build]
types:
- completed
jobs:
test-analysis:
runs-on: ubuntu-latest
permissions:
checks: write
name: Tests analysis
steps:
- name: Download surefire reports
uses: actions/github-script@v6
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "surefire-reports.zip"
})[0];
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/surefire-reports.zip`, Buffer.from(download.data));
- name: Unzip files
run: unzip surefire-reports.zip
- name: Surefire Report
uses: kiegroup/kogito-pipelines/.ci/actions/surefire-report@main
if: ${{ always() }}
with:
check_name: ${{ github.event.workflow_run.name }} test report
commit: ${{ github.event.workflow_run.head_sha }}
report_paths: '**/surefire-reports/TEST-*.xml'
skip_publishing: false