diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 98b89f7..91e4e99 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -53,6 +53,8 @@ jobs: steps: - name: Check out repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + with: + fetch-depth: 0 - uses: bufbuild/buf-setup-action@2211e06e8cf26d628cda2eea15c95f8c42b080b3 with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -62,11 +64,25 @@ jobs: java-version: "17" distribution: "temurin" server-id: github + - name: Cache SonarCloud packages + uses: actions/cache@v4 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 - name: Maven Test Coverage env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BUF_INPUT_HTTPS_USERNAME: opentdf-bot BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN_OPENTDF }} - run: mvn --batch-mode clean verify -P coverage + run: mvn --batch-mode clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=opentdf_java-sdk -P coverage platform-integration: runs-on: ubuntu-22.04 diff --git a/sdk/pom.xml b/sdk/pom.xml index b6f06e1..0e60894 100644 --- a/sdk/pom.xml +++ b/sdk/pom.xml @@ -297,6 +297,7 @@ ${project.parent.basedir}/target/jacoco.exec + ${project.parent.basedir}/target/site/jacoco/ XML