|
@@ -24,8 +24,24 @@ jobs:
|
|
|
distribution: 'temurin'
|
|
|
java-version: ${{ env.JAVA_VERSION }}
|
|
|
cache: 'maven'
|
|
|
+ - name: Cache SonarCloud packages
|
|
|
+ uses: actions/cache@v2
|
|
|
+ with:
|
|
|
+ path: ~/.sonar/cache
|
|
|
+ key: ${{ runner.os }}-sonar
|
|
|
+ restore-keys: ${{ runner.os }}-sonar
|
|
|
- name: Build and Test
|
|
|
- run: mvn -B clean install jacoco:report -Pcoverage,dependency-check
|
|
|
+ run: >
|
|
|
+ mvn -B verify
|
|
|
+ jacoco:report
|
|
|
+ org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
|
|
|
+ -Pcoverage,dependency-check
|
|
|
+ -Dsonar.projectKey=cryptomator_cryptomator
|
|
|
+ -Dsonar.organization=cryptomator
|
|
|
+ -Dsonar.host.url=https://sonarcloud.io
|
|
|
+ env:
|
|
|
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
|
|
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
|
- name: Upload code coverage report
|
|
|
id: codacyCoverageReporter
|
|
|
if: "github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'pr:safe')"
|