From 05f5460ffbe925ecff7094155a857d4d7cbb75ba Mon Sep 17 00:00:00 2001 From: "Wojtek.Swieton" Date: Thu, 1 Feb 2024 13:33:41 +0100 Subject: [PATCH] ACS-6309 Add reports to Postgres 15.4 tests --- .github/workflows/ci.yml | 38 +++++++++++++++++++++++++++++++++++++- pom.xml | 6 ------ remote-api/pom.xml | 6 ++++++ repository/pom.xml | 6 ++++++ 4 files changed, 49 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7984c313d29..1033550b596 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -398,8 +398,44 @@ jobs: run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d env: POSTGRES_VERSION: 15.4 + - name: "Prepare Report Portal" + uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0 + id: rp-prepare + with: + rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} + rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }} + rp-project: ${{ env.RP_PROJECT }} + rp-use-static-launch-name: true + - name: "Add GitHub Step Summary" + env: + RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }} + RP_KEY: ${{ steps.rp-prepare.outputs.key }} + RP_URL: ${{ steps.rp-prepare.outputs.url }} + run: bash scripts/ci/add_step_summary.sh - name: "Run tests" - run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco + id: run-tests + env: + RP_OPTS: ${{ steps.rp-prepare.outputs.mvn-opts }} + run: | + eval "args=($RP_OPTS)" + mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}" + continue-on-error: true + - name: "Update GitHub Step Summary" + run: | + echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY + - name: "Summarize Report Portal" + uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0 + id: rp-summarize + with: + tests-outcome: ${{ steps.run-tests.outcome }} + rp-launch-key: ${{ steps.rp-prepare.outputs.key }} + rp-project: ${{ env.RP_PROJECT }} + rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }} + - name: "Exit on failure" + if: steps.run-tests.outcome != 'success' + run: | + echo "::error title=run-tests::Tests failed: re-throwing on error." + exit 1 - name: "Clean Maven cache" run: bash ./scripts/ci/cleanup_cache.sh diff --git a/pom.xml b/pom.xml index 412fd389e45..9545de32995 100644 --- a/pom.xml +++ b/pom.xml @@ -820,12 +820,6 @@ 4.13.2 test - - com.epam.reportportal - agent-java-testng - 5.4.0 - test - org.antlr gunit diff --git a/remote-api/pom.xml b/remote-api/pom.xml index d6182542584..b45df5b371d 100644 --- a/remote-api/pom.xml +++ b/remote-api/pom.xml @@ -66,6 +66,12 @@ junit test + + com.epam.reportportal + agent-java-testng + 5.4.0 + test + org.mockito mockito-core diff --git a/repository/pom.xml b/repository/pom.xml index 48e51436751..2c6b00dcbca 100644 --- a/repository/pom.xml +++ b/repository/pom.xml @@ -638,6 +638,12 @@ junit test + + com.epam.reportportal + agent-java-testng + 5.4.0 + test + org.assertj assertj-core