Skip to content

Commit e077038

Browse files
SLCORE-1631 Avoid running analysis on test failure (#1543)
* SLCORE-1631 Avoid running analysis on test failure * Rever the test case
1 parent 97dac4b commit e077038

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,12 @@ jobs:
7272
SCANNER_VERSION: 5.1.0.4751
7373
PULL_REQUEST: ${{ github.event.pull_request.number || '' }}
7474
run: |
75-
if git rev-parse --is-shallow-repository --quiet >/dev/null 2>&1; then
76-
echo "Fetch Git references for SonarQube analysis..."
77-
git fetch --unshallow || true
78-
fi
79-
maven_goals=("verify" "org.sonarsource.scanner.maven:sonar-maven-plugin:${SCANNER_VERSION}:sonar")
75+
mvn verify
76+
maven_goals=("org.sonarsource.scanner.maven:sonar-maven-plugin:${SCANNER_VERSION}:sonar")
8077
maven_goals+=("-Pcoverage" "-Dcommercial")
8178
sonar_props=("-Dsonar.host.url=${SONAR_HOST_URL}" "-Dsonar.token=${SONAR_TOKEN}")
8279
sonar_props+=("-Dsonar.projectVersion=${CURRENT_VERSION}" "-Dsonar.scm.revision=$GITHUB_SHA")
8380
sonar_props+=("-Dsonar.coverage.jacoco.xmlReportPaths=${{ github.workspace }}/report-aggregate/target/site/jacoco-aggregate/jacoco.xml")
84-
if [[ "${GITHUB_EVENT_NAME:?}" == "pull_request" ]]; then
85-
sonar_props+=("-Dsonar.pullrequest.key=$PULL_REQUEST")
86-
sonar_props+=("-Dsonar.pullrequest.branch=$GITHUB_HEAD_REF")
87-
sonar_props+=("-Dsonar.pullrequest.base=$GITHUB_BASE_REF")
88-
echo "Fetch ${GITHUB_BASE_REF:?} for SonarQube analysis..."
89-
git fetch origin "${GITHUB_BASE_REF}" || true
90-
fi
9181
echo "Maven command: mvn ${maven_goals[*]} ${sonar_props[*]}"
9282
mvn "${maven_goals[@]}" "${sonar_props[@]}"
9383
- name: Generate test report on failure

0 commit comments

Comments
 (0)