Merge pull request #347 from iti-ict/hotfix/groovy-compilation-depend… #218
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and deploy | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'wakamiti-doc/**' | |
- 'wakamiti-vscode-extension/**' | |
- '.github/workflows/**' | |
jobs: | |
build: | |
name: Build and deploy | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
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 install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -B -ntp \ | |
-Dsonar.organization=iti-ict \ | |
-Dsonar.host.url=https://sonarcloud.io \ | |
-Dsonar.projectKey=iti-ict_kukumo \ | |
-Dsonar.issue.ignore.multicriteria=e1,e2 \ | |
-Dsonar.issue.ignore.multicriteria.e1.ruleKey=java:S2187 \ | |
-Dsonar.issue.ignore.multicriteria.e1.resourceKey=**/*.java \ | |
-Dsonar.issue.ignore.multicriteria.e2.ruleKey=java:S5960 \ | |
-Dsonar.issue.ignore.multicriteria.e2.resourceKey=**/*.java \ | |
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | |
# ./mvnw -B -ntp install -DskipTests | |
# - name: Copy plugin documentation | |
# run: | | |
# echo $(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) # print pom version |