From 2c04ecf63f8581cacacccfd9aa6cff758740d8d9 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Thu, 6 May 2021 18:19:12 +0200 Subject: [PATCH 01/13] 105: Build with Java 11 required by SonarCloud Task-Url: http://github.com/pitest/pitclipse/issues/105 --- .github/workflows/maven.yml | 4 ++-- pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7fb9923f..bbbc2742 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -17,10 +17,10 @@ jobs: with: # Shallow clones should be disabled for a better relevancy of SonarQube analysis fetch-depth: 0 - - name: Set up JDK 1.8 + - name: Set up JDK 11 uses: actions/setup-java@v1 with: - java-version: 1.8 + java-version: 11 - name: Cache Maven packages uses: actions/cache@v2 with: diff --git a/pom.xml b/pom.xml index 866cb083..279d00cf 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 1.7.0 - 0.8.1 + 0.8.6 1.7 From 633b1b5d0405a56aa8e5b79323f4cce26b6ff6a7 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Thu, 6 May 2021 18:29:53 +0200 Subject: [PATCH 02/13] 105: Upgrade to Mockito 2.23 for Java 11 Task-Url: http://github.com/pitest/pitclipse/issues/105 --- .../org.pitest.pitclipse.target.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releng/org.pitest.pitclipse.target/org.pitest.pitclipse.target.target b/releng/org.pitest.pitclipse.target/org.pitest.pitclipse.target.target index e23b5d85..1aa82ee0 100644 --- a/releng/org.pitest.pitclipse.target/org.pitest.pitclipse.target.target +++ b/releng/org.pitest.pitclipse.target/org.pitest.pitclipse.target.target @@ -54,7 +54,7 @@ - + \ No newline at end of file From 57e9165724e438e14e9707c8753450b30f3d3c51 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Thu, 6 May 2021 18:33:09 +0200 Subject: [PATCH 03/13] 105: greaterOrEqual for guava in ui feature Task-Url: http://github.com/pitest/pitclipse/issues/105 --- features/org.pitest.pitclipse.ui.feature/feature.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/org.pitest.pitclipse.ui.feature/feature.xml b/features/org.pitest.pitclipse.ui.feature/feature.xml index e18017c7..5e3c2f06 100644 --- a/features/org.pitest.pitclipse.ui.feature/feature.xml +++ b/features/org.pitest.pitclipse.ui.feature/feature.xml @@ -233,7 +233,7 @@ Provides views and contextual actions to search the code for mutations and show - + From 03624d24c634fb4e7fcff3a089657487cad6f43d Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Fri, 7 May 2021 09:11:11 +0200 Subject: [PATCH 04/13] 105: configured Sonar in parent POM Task-Url: http://github.com/pitest/pitclipse/issues/105 --- pom.xml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 279d00cf..2ab4e514 100644 --- a/pom.xml +++ b/pom.xml @@ -44,12 +44,6 @@ Pitclipse - - true - Pitclipse echebbi-github @@ -61,8 +55,13 @@ - **/*Exception.java,**/Activator.java - ../../tests/${project.artifactId}.tests/target/jacoco.exec + + **/*Exception.java, + **/Activator.java + + + ${basedir}/tests/org.pitest.pitclipse.tests.coverage.report/target/site/jacoco-aggregate/jacoco.xml + **/*Exception.java, - **/Activator.java + **/*Activator.java ${basedir}/../../tests/org.pitest.pitclipse.tests.coverage.report/target/site/jacoco-aggregate/jacoco.xml From c18557c3b9cf17e925901a1e50afc0c35cbce569 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Fri, 7 May 2021 10:22:18 +0200 Subject: [PATCH 10/13] 105: exclude UI classes from sonar coverage Until UI tests are back Task-Url: http://github.com/pitest/pitclipse/issues/105 --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 5d9a46d5..751cf946 100644 --- a/pom.xml +++ b/pom.xml @@ -59,6 +59,11 @@ **/*Exception.java, **/*Activator.java + + + **/ui/*.java + ${basedir}/../../tests/org.pitest.pitclipse.tests.coverage.report/target/site/jacoco-aggregate/jacoco.xml From 0e2da55c929f4fd03c53e445f5b0bcf74c5d98aa Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Fri, 7 May 2021 11:26:29 +0200 Subject: [PATCH 11/13] 105: sonar goal only on main repo Task-Url: http://github.com/pitest/pitclipse/issues/105 --- .github/workflows/maven.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7be73135..98a03007 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -29,10 +29,13 @@ jobs: ~/.sonar/cache key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/*.yml', '**/*.target') }} restore-keys: ${{ runner.os }}-m2- + - name: Set Maven Additional Goals + run: | + echo "SONARGOAL=sonar:sonar" >> $GITHUB_ENV + if: github.repository == 'pitest/pitclipse' - name: Maven Build run: > - xvfb-run mvn verify -Pjacoco - sonar:sonar + xvfb-run mvn verify -Pjacoco $SONARGOAL env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From f9166fc4b2e3feedf3380906b9f6ffccb013603d Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Fri, 7 May 2021 13:31:27 +0200 Subject: [PATCH 12/13] Check ${{ secrets.SONAR_TOKEN }} --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 98a03007..79b8b65c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -32,7 +32,7 @@ jobs: - name: Set Maven Additional Goals run: | echo "SONARGOAL=sonar:sonar" >> $GITHUB_ENV - if: github.repository == 'pitest/pitclipse' + if: ${{ secrets.SONAR_TOKEN }} != '' - name: Maven Build run: > xvfb-run mvn verify -Pjacoco $SONARGOAL From 22f660ab28b190fbe7ea30c80f1631011101769f Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Fri, 7 May 2021 13:40:52 +0200 Subject: [PATCH 13/13] First set env: SONAR_TOKEN --- .github/workflows/maven.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 79b8b65c..c1078729 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -10,6 +10,8 @@ on: jobs: build: + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} runs-on: ubuntu-latest steps: @@ -32,13 +34,12 @@ jobs: - name: Set Maven Additional Goals run: | echo "SONARGOAL=sonar:sonar" >> $GITHUB_ENV - if: ${{ secrets.SONAR_TOKEN }} != '' + if: ${{ env.SONAR_TOKEN }} - name: Maven Build run: > xvfb-run mvn verify -Pjacoco $SONARGOAL env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Archive Test Results uses: actions/upload-artifact@v2 if: ${{ failure() }}