Skip to content

Commit

Permalink
Merge pull request #232 from valtech/fix-github-workflow-for-sonar-scan
Browse files Browse the repository at this point in the history
fix: adjust workflow file…
  • Loading branch information
christinebaumann committed Apr 23, 2024
2 parents 60b1717 + 89331f4 commit f1f20f6
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
- uses: actions/checkout@v4

- name: Set up Java Env
uses: actions/setup-java@v4
with: # The last version will be used by default and available globally via JAVA_HOME.
java-version: |
17
11
distribution: 'temurin'
cache: maven

Expand All @@ -38,11 +40,14 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build with Maven
- name: Build and Test with Maven
env:
JAVA_HOME: ${{ env.JAVA_HOME_11_X64 }}
run: mvn clean install javadoc:javadoc

- name: Build and analyze
- name: Analyze with SonarQube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=aecu
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}
run: mvn -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=aecu

0 comments on commit f1f20f6

Please sign in to comment.