diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba5c57c..8f8c477 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,32 +19,46 @@ on: workflow_dispatch: jobs: - java-17: - runs-on: ubuntu-latest + mvn-install: + strategy: + matrix: + java: [17] + os: [ubuntu-latest, windows-latest] + include: + - os: ubuntu-latest + java: 17 + upload-dependency-graph: true + run-sonarcloud: true + run-coveralls: true + + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v3 with: - java-version: "17" + java-version: ${{ matrix.java }} distribution: "temurin" cache: maven - name: Build with Maven run: mvn install # Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - - name: Update dependency graph + - if: ${{ matrix.upload-dependency-graph }} + name: Update dependency graph uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 - - name: SonarCloud + - if: ${{ matrix.run-sonarcloud }} + name: SonarCloud env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: mvn sonar:sonar -P sonarcloud - - name: Coveralls + - if: ${{ matrix.run-coveralls }} + name: Coveralls uses: coverallsapp/github-action@v2 with: # *base-path* is prepended to all paths in order to correctly reference source files on coveralls.io