diff --git a/.github/workflows/main-cp.yml b/.github/workflows/main-cp.yml index 53670fe..6dda839 100644 --- a/.github/workflows/main-cp.yml +++ b/.github/workflows/main-cp.yml @@ -13,21 +13,12 @@ jobs: # The type of runner that the job will run on runs-on: ubuntu-latest # Set the cp.icr.io ace container as runtime. - # Running as root (-u 0) allows the installation of the docker binaries. container: image: cp.icr.io/cp/appc/ace:12.0.11.0-r1 - options: -u 0 credentials: username: ${{ secrets.CP_USERNAME }} password: ${{ secrets.CP_PASSWORD }} steps: - - name: Install prereqs - run: | - echo "Installing tar" - microdnf install tar - echo "Installing Maven" - microdnf install maven - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 @@ -37,6 +28,25 @@ jobs: echo "Loading ACE profile" export LICENSE=accept . /opt/ibm/ace-12/server/bin/mqsiprofile - echo "Running Maven build and unit test" - # RedHat UBI8 Maven is too old for --no-transfer-progress - mvn -Dinstall.work.directory=/tmp/maven-output/ace-server verify + + set -e # Fail on error - this must be done after the profile in case the container has the profile loaded already + + echo ======================================================================== + echo Building application + echo ======================================================================== + # Using --compile-maps-and-schemas for 12.0.11 and later . . . + ibmint package --input-path . --output-bar-file $PWD/tea-application-combined.bar --project TeaSharedLibraryJava --project TeaSharedLibrary --project TeaRESTApplication --compile-maps-and-schemas + + echo ======================================================================== + echo Building unit tests + echo ======================================================================== + # Create the unit test work directory + mqsicreateworkdir /tmp/test-work-dir + mqsibar -w /tmp/test-work-dir -a $PWD/tea-application-combined.bar + # Build just the unit tests + ibmint deploy --input-path . --output-work-directory /tmp/test-work-dir --project TeaRESTApplication_UnitTest + + echo ======================================================================== + echo Running unit tests + echo ======================================================================== + IntegrationServer -w /tmp/test-work-dir --no-nodejs --start-msgflows false --test-project TeaRESTApplication_UnitTest --test-junit-options --reports-dir=junit-reports