Skip to content

Commit

Permalink
CI: Only build and archive code coverage report from a single job (i.…
Browse files Browse the repository at this point in the history
…e. JDK 11 on Linux).
  • Loading branch information
rhusar committed Apr 5, 2024
1 parent 6aa4d5d commit 58c791f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build (with coverage) with Maven using JDK ${{ matrix.java }}
run: mvn -B verify -P coverage
- name: Build with Maven using JDK ${{ matrix.java }}
run: mvn --batch-mode --no-transfer-progress verify
- name: Build with coverage with Maven using JDK ${{ matrix.java }}
if: ${{ matrix.java == '11' && matrix.os == 'ubuntu-latest' }}
run: mvn --batch-mode --no-transfer-progress --activate-profiles=coverage verify
- name: Upload JaCoCo report
uses: actions/upload-artifact@v4
if: ${{ matrix.java == '11' && matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v4
with:
name: jacoco
path: code-coverage/target/site/jacoco-aggregate

0 comments on commit 58c791f

Please sign in to comment.