Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task 105 sonar cloud #130

Merged
merged 15 commits into from
May 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ on:

jobs:
build:
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
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:
Expand All @@ -29,8 +31,15 @@ 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: ${{ env.SONAR_TOKEN }}
- name: Maven Build
run: xvfb-run mvn verify -Pjacoco
run: >
xvfb-run mvn verify -Pjacoco $SONARGOAL
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive Test Results
uses: actions/upload-artifact@v2
if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion features/org.pitest.pitclipse.ui.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Provides views and contextual actions to search the code for mutations and show
<import plugin="org.eclipse.ui.workbench.texteditor" version="3.9.100" match="compatible"/>
<import plugin="org.eclipse.jface.text" version="3.10.0" match="compatible"/>
<import plugin="org.pitest.pitclipse.runner"/>
<import plugin="com.google.guava" version="21.0.0" match="compatible"/>
<import plugin="com.google.guava" version="21.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.debug.ui" version="3.11.101" match="compatible"/>
<import plugin="org.eclipse.jdt.launching" version="3.8.0" match="compatible"/>
<import plugin="org.pitest.pitclipse.launch"/>
Expand Down
27 changes: 18 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<!-- DEPENDENCIES -->
<!-- last version of Tycho before requiring Java 11 -->
<tycho-version>1.7.0</tycho-version>
<jacoco-version>0.8.1</jacoco-version>
<jacoco-version>0.8.6</jacoco-version>

<!-- MISC -->
<maven-antrun-plugin.version>1.7</maven-antrun-plugin.version>
Expand All @@ -44,12 +44,6 @@
<site.label>Pitclipse</site.label>

<!-- SONARQUBE -->
<!-- On Travis CI, SonarQube doesn't support Java 8 anymore.
I can't remove the SonarQube integration because I am
not an administrator of the Pitest organization so let's
just ask the CI to skip the analysis as a quickfix. -->
<sonar.skip>true</sonar.skip>

<sonar.projectName>Pitclipse</sonar.projectName>

<sonar.organization>echebbi-github</sonar.organization>
Expand All @@ -61,8 +55,18 @@
<!-- Ignore :
- Exceptions,
- untestable activators -->
<sonar.exclusions>**/*Exception.java,**/Activator.java</sonar.exclusions>
<sonar.jacoco.reportPaths>../../tests/${project.artifactId}.tests/target/jacoco.exec</sonar.jacoco.reportPaths>
<sonar.exclusions>
**/*Exception.java,
**/*Activator.java
</sonar.exclusions>
<!-- TODO: reactivate coverage on UI classes, when
UI tests are back -->
<sonar.coverage.exclusions>
**/ui/*.java
</sonar.coverage.exclusions>
<sonar.coverage.jacoco.xmlReportPaths>
${basedir}/../../tests/org.pitest.pitclipse.tests.coverage.report/target/site/jacoco-aggregate/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<!-- COMMANDS:
Expand Down Expand Up @@ -213,6 +217,11 @@
<artifactId>tycho-eclipserun-plugin</artifactId>
<version>${tycho-version}</version>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.9.0.2155</version>
</plugin>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<unit id="org.hamcrest.library.source" version="0.0.0"/>
<unit id="org.hamcrest.text" version="0.0.0"/>
<unit id="org.hamcrest.text.source" version="0.0.0"/>
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20180606145124/repository"/>
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20191126223242/repository"/>
</location>
</locations>
</target>