chore: split gradle dependency submission and sonar into separate wor… #1082
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sonar | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| sonar: | |
| name: Sonar | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'eclipse/openvsx' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Cache SonarCloud packages | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 | |
| with: | |
| path: ~/.sonar/cache | |
| key: ${{ runner.os }}-sonar | |
| restore-keys: ${{ runner.os }}-sonar | |
| - name: Set up JDK | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 25 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@f29f5a9d7b09a7c6b29859002d29d24e1674c884 # v5 | |
| - name: Generate JaCoCo test report | |
| run: server/gradlew --no-daemon -p server jacocoTestReport | |
| - name: Make server libraries directory | |
| run: mkdir server/libraries | |
| - name: Copy server libraries | |
| run: find ~/.gradle/caches -type f -name '*.jar' -exec cp {} server/libraries \; | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9 # v7.0.0 | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |