diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index c9d58f52..d4bbf41e 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -8,12 +8,13 @@ on: permissions: read-all jobs: - build-ubuntu: + build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: - java: [11, 17, 21, 22, 23] + os: [ubuntu-latest, windows-latest, macOS-latest] + java: [11, 17, 21, 23] steps: - uses: actions/checkout@v4 @@ -26,47 +27,6 @@ jobs: - name: Build with Maven run: mvn test jacoco:report --file pom.xml -B - - uses: codecov/codecov-action@v3 - with: - file: target/site/jacoco/jacoco.xml - name: codecov - - build-windows: - - runs-on: windows-latest - strategy: - matrix: - java: [11, 17, 21, 22, 23] - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: ${{ matrix.java }} - cache: 'maven' - - name: Build with Maven - run: mvn package --file pom.xml -B - - build-macos: - - runs-on: macOS-latest - strategy: - matrix: - java: [11, 17, 21, 22, 23] - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: ${{ matrix.java }} - cache: 'maven' - - name: Build with Maven - run: mvn package --file pom.xml -B - build-sonar: name: Build runs-on: ubuntu-latest @@ -95,3 +55,10 @@ jobs: run: mvn -B -f examples/pom.xml package - name: Build spring-boot run: mvn -B -f spring-boot-example/pom.xml package + - uses: codecov/codecov-action@v5 + with: + files: target/site/jacoco/jacoco.xml + name: codecov + fail_ci_if_error: true + env: + CODECOV_TOKEN: a7a3a75d-8ee9-483e-8430-59b6b39471e2