Skip to content

Commit

Permalink
update CI file
Browse files Browse the repository at this point in the history
  • Loading branch information
Topin2001 committed Dec 7, 2023
1 parent 09a5cf0 commit b4e8f4b
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/java-continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,28 +90,22 @@ jobs:
if: ${{ github.repository_owner == 'cnescatlab' }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
distribution: 'zulu'
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v3
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
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
Expand All @@ -122,4 +116,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.organization=lequal -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -X
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar

0 comments on commit b4e8f4b

Please sign in to comment.