-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ACS-6309 Integration with Report Portal - changes in CI for remote_ap…
…i_app_context_test_suites
- Loading branch information
1 parent
60e42b4
commit bd98f88
Showing
2 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,9 @@ env: | |
CI_WORKSPACE: ${{ github.workspace }} | ||
TAS_ENVIRONMENT: ./packaging/tests/environment | ||
TAS_SCRIPTS: ../alfresco-community-repo/packaging/tests/scripts | ||
# Report Portal settings | ||
RP_LAUNCH_PREFIX: "${{ github.workflow }} - ${{ github.job }}" | ||
RP_PROJECT: alfresco-backend | ||
|
||
jobs: | ||
prepare: | ||
|
@@ -196,8 +199,44 @@ jobs: | |
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV | ||
- name: "Set up the environment" | ||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d | ||
- name: "Prepare Report Portal" | ||
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | ||
id: rp-prepare | ||
with: | ||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.tests.name }} | ||
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 remote-api -Dtest=${{ matrix.testSuite }} -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 remote-api -Dtest=${{ matrix.testSuite }} -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/[email protected] | ||
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "=========================== Starting Add Step Summary Script ===========================" | ||
PS4="\[\e[35m\]+ \[\e[m\]" | ||
set -vex | ||
|
||
echo "#### ⏱ Before Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY | ||
echo "#### ⚙ Configuration" >> $GITHUB_STEP_SUMMARY | ||
|
||
if [[ "$RP_ENABLED" == 'true' ]]; then | ||
echo "- [Report Portal]($RP_URL) configured with key "'`'$RP_KEY'`' >> $GITHUB_STEP_SUMMARY | ||
else | ||
echo "- Report Portal not enabled" >> $GITHUB_STEP_SUMMARY | ||
fi | ||
|
||
set +vex | ||
echo "=========================== Finishing Add Step Summary Script ==========================" |