Skip to content

Commit

Permalink
Update sonar-project
Browse files Browse the repository at this point in the history
  • Loading branch information
louisjdmartin committed Jun 19, 2024
1 parent a230f2f commit bac1e6f
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/java-continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,48 +41,3 @@ jobs:
restore-keys: ${{ runner.os }}-yarn-
- name: Build with Maven
run: mvn -B clean install
code-analysis:
runs-on: ubuntu-latest
name: SonarCloud Code Analysis
# It's not possible to launch an analysis on external pull requests
if: ${{ github.repository_owner == 'cnescatlab' }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- 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 }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Cache SonarCloud packages
uses: actions/cache@v2
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build
run: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package
- name: "Setup java for just sonar analysis"
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@v2.2 # Ex: v2.1.0, See the latest version at https://github.com/marketplace/actions/official-sonarqube-scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonarcloud.io

0 comments on commit bac1e6f

Please sign in to comment.