diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 1dad3a7..2df4039 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -1,7 +1,25 @@ name: Build +env: + # https://github.com/actions/virtual-environments/issues/1499 + MAVEN_CLI_OPTS: '-ntp --batch-mode --errors --fail-at-end --show-version -Dmaven.wagon.httpconnectionManager.ttlSeconds=60 -Dmaven.wagon.http.retryHandler.count=3 -Dstyle.color=always' -on: [push] +on: + # allow to manual run the action + workflow_dispatch: {} + pull_request: {} + merge_group: {} + push: + branches: + - develop + tags: + - '*' + +permissions: + contents: write + # For junit report + checks: write + pull-requests: write jobs: build: @@ -18,5 +36,18 @@ jobs: - name: Build with Maven run: | - ./mvnw clean verify -U + ./mvnw ${MAVEN_CLI_OPTS} clean verify ./mvnw javadoc:javadoc + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() # always run even if the previous step fails + with: + report_paths: '**/target/*-reports/TEST-*.xml' + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4.6.0 + with: + file: "${{ github.workspace }}/spi/target/jacoco.xml" + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: ${{ !startsWith(github.event.ref, 'refs/tags/v') }} diff --git a/pom.xml b/pom.xml index 9ccd50d..055cb9b 100644 --- a/pom.xml +++ b/pom.xml @@ -247,32 +247,6 @@ - - org.apache.maven.plugins - maven-source-plugin - ${maven-source-plugin.version} - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - - attach-javadocs - - jar - - - - maven-release-plugin 3.1.1