-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
40 lines (36 loc) · 1.34 KB
/
action.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
name: SonarQube Issue Conversion
description: Transform tool output into generic SonarQube format(s)
inputs:
input:
description: Single or multiple tool output files to convert
required: true
output:
description: Output file for converted issues
required: true
transformation:
description: Type of transformation to apply (one of gtest-to-generic-execution, mutation-test-to-generic-issue)
required: true
runs:
using: composite
steps:
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.12"
- shell: bash
run: |
python -m pip install --upgrade pip==24.3.1
pip install lxml
- shell: bash
run: |
echo 'Using transformation: ${{ inputs.transformation }} to convert ${{ inputs.input }} to ${{ inputs.output }}'
case ${{ inputs.transformation }} in
'gtest-to-generic-execution')
{ echo '<testExecutions version="1">'; xsltproc ${GITHUB_ACTION_PATH}/converters/gtest-to-generic-execution.xslt ${{ inputs.input }}; echo '</testExecutions>'; } | tee ${{ inputs.output }} > /dev/null
;;
'mutation-test-to-generic-issue')
;;
*)
echo 'Unknown transformation type: ${{ inputs.transformation }}'
exit 1
;;
esac