name: Build Chain

on: [pull_request]

jobs:
  build-chain:
    strategy:
      matrix:
        java-version: [8, 11]
      fail-fast: false
    runs-on: ubuntu-latest
    name: Maven Build
    steps:
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java-version }}
      - name: Build Chain ${{ matrix.java-version }}
        id: build-chain
        uses: kiegroup/github-action-build-chain@v1.4
        with:
          parent-dependencies: 'jbpm-designer'
          child-dependencies: 'jbpm-wb'
          build-command: 'mvn -e -nsu -Dfull -Pwildfly install -Prun-code-coverage  -Dcontainer.profile=wildfly -Dcontainer=wildfly -Dintegration-tests=true -Dmaven.test.failure.ignore=true'
          build-command-upstream: |
            mvn -e -T1C install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true
            rm -rf ./*
          workflow-file-name: "pull_request.yml"
        env:
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
                                        