Skip to content

Commit

Permalink
Merge pull request #28 from carlspring/issue-19
Browse files Browse the repository at this point in the history
Issue 19: Set up Sonarcloud analysis #19
  • Loading branch information
carlspring authored Aug 21, 2020
2 parents 7448e85 + 91a1b71 commit 30d1022
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ jobs:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest]
# Commenting Windows out in order to preserve our free minutes.
# We can re-enable it, if we get a sponsor.
#operating-system: [ubuntu-latest, windows-latest]
operating-system: [ubuntu-latest]
java: [ 8, 11.0.3 ]
steps:
- name: Checkout
Expand All @@ -28,3 +31,25 @@ jobs:
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn clean install -Pintegration-tests

sonarqube:
runs-on: ubuntu-latest
strategy:
matrix:
# Commenting Windows out in order to preserve our free minutes.
# We can re-enable it, if we get a sponsor.
#operating-system: [ubuntu-latest, windows-latest]
operating-system: [ubuntu-latest]
java: [ 11.0.3 ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Analyze code and publish results to Sonarcloud
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn verify sonar:sonar
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- Sonarcloud properties -->
<sonar.projectKey>carlspring_s3fs-nio2</sonar.projectKey>
<sonar.organization>carlspring</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<!-- Sonarcloud properties -->

<maven.surfire.plugin.version>2.7.1</maven.surfire.plugin.version>
<slf4j.version>1.7.5</slf4j.version>
<com.amazonaws.aws-java-sdk-s3.version>1.11.232</com.amazonaws.aws-java-sdk-s3.version>
Expand Down

0 comments on commit 30d1022

Please sign in to comment.