diff --git a/.github/sonar_decorator.png b/.github/sonar_decorator.png new file mode 100644 index 0000000..9a4c529 Binary files /dev/null and b/.github/sonar_decorator.png differ diff --git a/.github/workflows/pr-main.yml b/.github/workflows/pr-main.yml deleted file mode 100644 index 406af44..0000000 --- a/.github/workflows/pr-main.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Sonar on PR to main - -on: - pull_request: - branches: [ main ] - types: [opened, synchronize, reopened, ready_for_review] - -permissions: - contents: read - checks: write - pull-requests: write - -jobs: - sonar: - if: github.event.pull_request.draft == false # Draft-PRs überspringen - runs-on: ubuntu-latest - environment: dev - - steps: - - name: Checkout (full history for PR analysis) - uses: actions/checkout@v4 - with: - fetch-depth: 0 # wichtig für Sonar PR-Diff - - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: '21' - cache: maven - - - name: Build & Unit tests - run: | - mvn -B -T1C -fae \ - -pl order-backend,product-backend -am \ - clean verify - - - name: Sonar analysis (Maven) - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - mvn -B -DskipTests sonar:sonar \ - -Dsonar.login=$SONAR_TOKEN \ - -Dsonar.qualitygate.wait=true diff --git a/README.md b/README.md index 6269fa4..5e5dc6d 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,5 @@ Dieses Repo demonstriert ohne echte Business-App eine Testlandschaft für den Ku - E2E-Test with Cypress \ ![Cypress UI](frontend/src/cypress/screenshots/cypress_open.png) +![Sonar PullRequest](.github/sonar_decorator.png) +