From ce3d36493db4fec6331ee74e3ec73deab10f7183 Mon Sep 17 00:00:00 2001 From: larsk21 <57503246+larsk21@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:15:38 +0100 Subject: [PATCH 1/2] enable SonarQube analysis and JavaDoc build in CI --- .github/workflows/ci.yml | 13 ++++++++++++- pom.xml | 6 +++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 207bca0a5..16bb2463b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,12 +34,23 @@ jobs: cache: 'maven' - name: Verify build + if: matrix.os != 'ubuntu-latest' run: > ./mvnw clean verify --batch-mode --update-snapshots --no-transfer-progress + - name: Verify build with Sonar + if: matrix.os == 'ubuntu-latest' + run: > + ./mvnw clean verify javadoc:javadoc-no-fork sonar:sonar -P coverage + --batch-mode + --update-snapshots + --no-transfer-progress + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Stage build results run: mkdir staging-${{ matrix.os }} && cp **/target/*.jar staging-${{ matrix.os }}/ @@ -48,7 +59,7 @@ jobs: with: name: Build Results path: staging-*/ - + deploy-snapshot: name: Deploy snapshot runs-on: ubuntu-latest diff --git a/pom.xml b/pom.xml index 10e3ce0c6..faa9f8057 100644 --- a/pom.xml +++ b/pom.xml @@ -43,11 +43,15 @@ applications - + 3.3 2.2.0 1.6.0 + + https://sonarcloud.io + vitruv-tools + vitruv-tools_Vitruv From 69ff2a7cd23d2e0756094867bbca13fbc03a7e88 Mon Sep 17 00:00:00 2001 From: larsk21 <57503246+larsk21@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:17:03 +0100 Subject: [PATCH 2/2] fix build result staging --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16bb2463b..bee0d4de9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,8 +51,13 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - name: Stage build results - run: mkdir staging-${{ matrix.os }} && cp **/target/*.jar staging-${{ matrix.os }}/ + - name: Stage build results (Unix) + if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' + run: mkdir staging-${{ matrix.os }} && find . -path '*/target/*.jar' -exec cp {} staging-${{ matrix.os }}/ \; + + - name: Stage build results (Windows) + if: matrix.os == 'windows-latest' + run: mkdir staging-${{ matrix.os }} && gci -Path . -Recurse -Include *.jar |? { $_.FullName -like '*\target\*.jar' } |% { cp $_.FullName staging-${{ matrix.os }} } - name: Upload build results uses: actions/upload-artifact@v3.1.3