diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 00000000..c173a3d7 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,33 @@ +name: SonarQube Scan + +on: + pull_request: + +permissions: + contents: read + +jobs: + sonarqube: + name: SonarQube Analysis + runs-on: [self-hosted, lob-runner, x64, Linux] + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 + + - name: Set up JDK 17 + uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 + with: + java-version: '17' + distribution: 'temurin' + + - name: Run tests with coverage + run: mvn clean verify jacoco:report + + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@ba9859eae8dd6bd29e412f25ddbbef3d032000f4 # v8.2.2 + continue-on-error: true + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml new file mode 100644 index 00000000..a4962858 --- /dev/null +++ b/.trunk/trunk.yaml @@ -0,0 +1,22 @@ +version: 0.1 +cli: + version: 1.22.13 + +plugins: + sources: + - id: trunk + ref: v1.6.7 + uri: https://github.com/trunk-io/plugins + +lint: + enabled: + - trufflehog@3.88.4 + ignore: + - linters: [ALL] + paths: + - target/** + - build/** + +runtimes: + enabled: + - java@17.0.0 diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..0350e89b --- /dev/null +++ b/codecov.yml @@ -0,0 +1,16 @@ +coverage: + status: + project: + default: + informational: true + patch: + default: + informational: true + +comment: + layout: "reach, diff, flags, files" + behavior: default + require_changes: false + +github_checks: + annotations: false diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..cd44a0f5 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,9 @@ +sonar.projectKey=lob_lob_java +sonar.organization=lob + +sonar.sources=src/main/java +sonar.tests=src/test/java +sonar.java.binaries=target/classes +sonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml + +sonar.sourceEncoding=UTF-8