File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ for file in " $@ " ; do
4
+ temp_file=" tempfile.xml"
5
+
6
+ # force write a new line at the end of the gotestsum-report.xml, or else
7
+ # the loop will skip the last line.
8
+ # fixes issue with a missing </testsuites>
9
+ echo -e " \n" >> $file
10
+
11
+ while read p; do
12
+ # we might try to report gotestsum-report.xml multiple times, so don't
13
+ # calculate codeowners more times than we need
14
+ if [[ " $p " =~ \< testcase && ! " $p " =~ " file=" ]]; then
15
+ class=$( echo " $p " | grep -o ' .v1/[^"]*"' )
16
+ file_name=$( echo " ${class: 3} " | sed ' s/.$//' ) # trim off the edges to get the path
17
+ new_line=$( echo " $p " | sed " s|<testcase \([^>]*\)>|<testcase \1 file=\" $file_name \" >|" )
18
+ echo " $new_line " >> " $temp_file "
19
+ else
20
+ echo " $p " >> " $temp_file "
21
+ fi
22
+ done < $file
23
+
24
+ mv " $temp_file " $file
25
+ done
Original file line number Diff line number Diff line change 42
42
curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_${{ env.DD_CI_CLI_BUILD }}" --output datadog-ci
43
43
chmod +x datadog-ci
44
44
45
+ - name : Add CodeOwners to JUnit files
46
+ shell : bash
47
+ run : cd ./.github/actions/add-codeowners && ./codeowners.sh ${{ inputs.files }}
48
+
45
49
- name : Upload the JUnit files
46
50
shell : bash
47
51
run : |
You can’t perform that action at this time.
0 commit comments