|
5 | 5 | # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
6 | 6 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
|
7 | 7 |
|
8 |
| -name: Build + Test + Verify + Sonar |
| 8 | +name: Build + Test + Sonar + Verify |
9 | 9 |
|
10 | 10 | on: [push, workflow_dispatch]
|
11 | 11 |
|
|
78 | 78 | name: ${{ steps.artifact.outputs.filename }}
|
79 | 79 | path: ./build/distributions/content/*/*
|
80 | 80 |
|
81 |
| - test: |
| 81 | + test_sonar: |
82 | 82 | needs: [build]
|
83 | 83 | runs-on: ubuntu-latest
|
84 | 84 | steps:
|
@@ -113,6 +113,14 @@ jobs:
|
113 | 113 | name: code-coverage-report
|
114 | 114 | path: ${{ github.workspace }}/build/reports/kover/html
|
115 | 115 |
|
| 116 | + - name: SonarCloud scans |
| 117 | + continue-on-error: true |
| 118 | + uses: ./.github/actions/sonar |
| 119 | + env: |
| 120 | + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |
| 121 | + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
| 122 | + GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} |
| 123 | + |
116 | 124 | verify:
|
117 | 125 | if: ${{ contains(github.ref, 'refs/heads/release/') }}
|
118 | 126 | needs: [build]
|
@@ -155,36 +163,3 @@ jobs:
|
155 | 163 | with:
|
156 | 164 | name: plugin-verifier-report
|
157 | 165 | path: ${{ github.workspace }}/build/reports/pluginVerifier
|
158 |
| - |
159 |
| - sonar: |
160 |
| - needs: [test] |
161 |
| - runs-on: ubuntu-latest |
162 |
| - steps: |
163 |
| - |
164 |
| - - name: Checkout the plugin GitHub repository |
165 |
| - uses: actions/checkout@v4 |
166 |
| - |
167 |
| - - name: Setup Java |
168 |
| - uses: actions/setup-java@v4 |
169 |
| - with: |
170 |
| - distribution: zulu |
171 |
| - java-version: 11 |
172 |
| - |
173 |
| - - name: Setup Gradle |
174 |
| - uses: gradle/actions/setup-gradle@v3 |
175 |
| - with: |
176 |
| - gradle-home-cache-cleanup: true |
177 |
| - |
178 |
| - - name: Get tests result from artifacts |
179 |
| - uses: actions/download-artifact@v4 |
180 |
| - with: |
181 |
| - name: tests-report |
182 |
| - path: ${{ github.workspace }}/build/reports/tests |
183 |
| - |
184 |
| - - name: SonarCloud scans |
185 |
| - continue-on-error: true |
186 |
| - uses: ./.github/actions/sonar |
187 |
| - env: |
188 |
| - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |
189 |
| - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
190 |
| - GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} |
0 commit comments