File: action.yml

package info (click to toggle)
dnsjava 3.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,516 kB
  • sloc: java: 45,056; xml: 914; makefile: 3
file content (63 lines) | stat: -rw-r--r-- 1,796 bytes parent folder | download | duplicates (2)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Prepare code analysis
description: Prepare the working directory for SonarQube code analysis

inputs:
  cache:
    description: Cache type

runs:
  using: composite
  steps:
    - name: Get reports
      uses: ./.github/actions/download-artifact
      with:
        name: reports-*

    - name: Get coverage
      uses: ./.github/actions/download-artifact
      with:
        name: merged-coverage

    - name: Get classes
      uses: ./.github/actions/download-artifact
      with:
        name: classes

    - name: Create paths for JUnit reporting
      id: junit_paths
      shell: bash
      run: |
        report_paths=""
        check_name=""
        for file in target/surefire-reports-*
        do
          report_paths="${file}/TEST-*.xml"$'\n'"${report_paths}"
          check_name="JUnit Report ${file##target/surefire-reports-}"$'\n'"${check_name}"
        done
        echo "report_paths<<EOF"$'\n'"${report_paths}EOF" >> $GITHUB_OUTPUT
        echo "check_name<<EOF"$'\n'"${check_name}EOF" >> $GITHUB_OUTPUT

    - name: Publish Test Report
      uses: mikepenz/action-junit-report@v4
      with:
        commit: ${{ github.event.workflow_run.head_sha }}
        report_paths: ${{ steps.junit_paths.outputs.report_paths }}
        check_name: ${{ steps.junit_paths.outputs.check_name }}
        require_tests: true
        check_retries: true
        detailed_summary: true

    - name: Set up JDK
      uses: actions/setup-java@v4
      with:
        java-version: ${{ env.BUILD_JAVA_VERSION }}
        distribution: temurin
        cache: ${{ inputs.cache }}

    - name: Cache SonarCloud packages
      if: inputs.cache
      uses: actions/cache@v4
      with:
        path: ~/.sonar/cache
        key: ${{ runner.os }}-sonar
        restore-keys: ${{ runner.os }}-sonar