diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 37644238..462ec021 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -28,32 +28,23 @@ jobs: runs-on: ${{ matrix.os }} name: Maven Build steps: - - name: Support longpaths + - name: Support long paths if: ${{ matrix.os == 'windows-latest' }} - run: git config --system core.longpaths true - - name: Set up JDK - uses: actions/setup-java@v1 + uses: kiegroup/kogito-pipelines/.ci/actions/long-paths@main + - name: Java and Maven Setup + uses: kiegroup/kogito-pipelines/.ci/actions/maven@main with: java-version: ${{ matrix.java-version }} - # See https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies - - name: Cache Maven packages - uses: actions/cache@v2 + maven-version: ${{ matrix.maven-version }} + cache-key-prefix: ${{ runner.os }}-${{ matrix.java-version }}-maven${{ matrix.maven-version }} + - name: Build Chain + uses: kiegroup/kogito-pipelines/.ci/actions/build-chain@main with: - path: ~/.m2 - key: ${{ runner.os }}-${{ matrix.java-version }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-${{ matrix.java-version }}-m2 - - name: Build Chain ${{ matrix.java-version }} - id: build-chain - uses: kiegroup/github-action-build-chain@v2.6.8 - with: - definition-file: https://raw.githubusercontent.com/${GROUP}/kogito-pipelines/main/.ci/pull-request-config.yaml + definition-file: https://raw.githubusercontent.com/kiegroup/kogito-pipelines/%{process.env.GITHUB_BASE_REF.replace(/(\d*)\.(.*)\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`).replace('development', 'main')}/.ci/pull-request-config.yaml + annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }} + github-token: "${{ secrets.GITHUB_TOKEN }}" env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" OPTAPLANNER_BUILD_MVN_OPTS_UPSTREAM: "-Dfull" - - name: Check Surefire Report + - name: Surefire Report + uses: kiegroup/kogito-pipelines/.ci/actions/surefire-report@main if: ${{ always() }} - uses: ScaCap/action-surefire-report@v1.0.10 - with: - fail_on_test_failures: true - fail_if_no_tests: false - skip_publishing: true