Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
latest ersion - what are you trying to achieve
I’m trying to apply sonar tool to the open source project that I’m working on. - what have you tried so far to achieve this
Hello, first of all I really appreciate for making good tool as this.
I’m trying to apply sonar tool to the open source project that I’m working on.
(GitHub - pinpoint-apm/pinpoint: APM, (Application Performance Management) tool for large-scale distributed systems.)
But, I had met the following exception and confirmed that it is not analyzed.
Can you help me to solve this error?
This is github action yml for sonar tool.
The reason I set package phase is when Pinpoint runs amount of test when I set verify phase .
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 7
uses: actions/setup-java@v1
with:
java-version: 7
- name: Set up JDK 9
uses: actions/setup-java@v1
with:
java-version: 9
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Set JAVA_HOME
run: |
echo "JAVA_7_HOME=$JAVA_HOME_7_0_302_X64" >> $GITHUB_ENV
echo "JAVA_8_HOME=$JAVA_HOME_8_X64" >> $GITHUB_ENV
echo "JAVA_9_HOME=$JAVA_HOME_9_0_7_X64" >> $GITHUB_ENV
echo "JAVA_HOME=$JAVA_HOME_8_X64" >> $GITHUB_ENV
- name: Java Environment
run: env | grep '^JAVA'
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Cache node modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Cache node install
uses: actions/cache@v2
with:
path: 'node_install'
key: ${{ runner.os }}-node_install-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-node_install-
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./mvnw -B package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
Regards,
Koo taejin.