Skip to content

Commit 319e697

Browse files
committed
use java 11 for sonarqube task
1 parent ada5c11 commit 319e697

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,27 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Set up JDK 1.8
21+
- name: Set up JDK 8
2222
uses: actions/setup-java@v1
2323
with:
24-
java-version: 1.8
24+
java-version: 8
2525
- name: Grant execute permission for gradlew
2626
run: chmod +x gradlew
27+
- name: Execute build test and jacocoTestReport
28+
run: ./gradlew build test jacocoTestReport --refresh-dependencies --no-daemon --continue
29+
- name: Set up JDK 11
30+
uses: actions/setup-java@v1
31+
with:
32+
java-version: 11
2733
- name: Extract branch name
2834
shell: bash
29-
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
35+
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
3036
id: extract_branch
31-
- name: Execute build test jacocoTestReport and Sonar
37+
- name: Run Sonar analysis
3238
env:
3339
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
3440
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
run: ./gradlew build test jacocoTestReport sonarqube -Dsonar.branch=${{ steps.extract_branch.outputs.branch }} --refresh-dependencies --no-daemon --continue
41+
run: ./gradlew sonarqube -Dsonar.branch=${{ steps.extract_branch.outputs.branch }}
3642
# run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed"
3743
# - name: Push codeCoverage to Codecov
3844
# run: bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)