Skip to content

Commit

Permalink
Merge pull request #3 from kmoco2am/feature/fixes
Browse files Browse the repository at this point in the history
SonarCloud and other fixes
  • Loading branch information
kmoco2am authored Nov 6, 2023
2 parents e6b01f7 + 3443d54 commit 06d23e0
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 10 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,19 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Package with Maven
run: ./mvnw --batch-mode package
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./mvnw --batch-mode package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
6 changes: 6 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Publish package
run: mvn --batch-mode deploy
env:
Expand Down
12 changes: 7 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@
<deploy.plugin.version>3.0.0-M1</deploy.plugin.version>
<resources.plugin.version>3.1.0</resources.plugin.version>
<surefire.plugin.version>3.0.0-M6</surefire.plugin.version>
<!-- JaCoCo Properties -->
<jacoco.version>0.8.8</jacoco.version>
<sonar.sources>src/main/java,src/main/js</sonar.sources>
<jacoco.version>0.8.11</jacoco.version>

<sonar.organization>kmoco2am</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.projectKey>kmoco2am_sonar-r-plugin</sonar.projectKey>
<sonar.sources>src/main/java</sonar.sources>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.jacoco.reportPath>${project.basedir}/target/jacoco.exec</sonar.jacoco.reportPath>
Expand Down Expand Up @@ -180,7 +183,6 @@
<version>1.21.0.505</version>
<extensions>true</extensions>
<configuration>
<!-- the entry-point class that extends org.sonar.api.SonarPlugin -->
<pluginClass>com.msd.gin.common.sonar.SonarRPlugin</pluginClass>

<!-- advanced properties can be set here. See paragraph "Advanced Build Properties". -->
Expand All @@ -195,7 +197,7 @@
<configuration>
<target>
<copy file="${project.basedir}/target/${project.artifactId}-${project.version}.jar"
tofile="${project.basedir}/.sonar/sonarqube-8.9.8.54436/extensions/plugins/${project.artifactId}-${project.version}.jar"/>
tofile="${project.basedir}/.sonar/sonarqube-9.9.2.77730/extensions/plugins/${project.artifactId}-${project.version}.jar"/>
</target>
</configuration>
<goals>
Expand Down
2 changes: 0 additions & 2 deletions sample-project/R/bad.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
library(dplyr)


T_and_F <- function() {
F
Expand Down
1 change: 1 addition & 0 deletions sample-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ A few hints for non-R developers to get environment for LintR up-and-running eas

```bash
brew install r
brew install fribidi
```

Content for `~/.Rprofile`:
Expand Down
2 changes: 1 addition & 1 deletion sample-project/sonar-scanner-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

set -euo pipefail

SONAR_SCANNER_VERSION=4.7.0.2747
SONAR_SCANNER_VERSION=5.0.1.3006
URL="https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-macosx.zip"

# Resolve where script is stored (symlinks too)
Expand Down
2 changes: 1 addition & 1 deletion sonar-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.
# ----------------------------------------------------------------------------

SONAR_NAME=sonarqube-8.9.8.54436
SONAR_NAME=sonarqube-9.9.2.77730
URL="https://binaries.sonarsource.com/Distribution/sonarqube/${SONAR_NAME}.zip"

set -euo pipefail
Expand Down

0 comments on commit 06d23e0

Please sign in to comment.