@@ -123,6 +123,7 @@ jobs:
123123 --obr mvn:dev.galasa/dev.galasa.uber.obr/${GALASA_VERSION}/obr \
124124 --class dev.galasa.simbank.tests/dev.galasa.simbank.tests.SimBankIVT \
125125 --remoteMaven https://development.galasa.dev/main/maven-repo/obr \
126+ --reportjson ${{ github.workspace }}/.galasa/temp/test-1.json \
126127 --log -
127128
128129 - name : Run the BasicAccountCreditTest
@@ -134,6 +135,7 @@ jobs:
134135 --obr mvn:dev.galasa/dev.galasa.uber.obr/${GALASA_VERSION}/obr \
135136 --class dev.galasa.simbank.tests/dev.galasa.simbank.tests.BasicAccountCreditTest \
136137 --remoteMaven https://development.galasa.dev/main/maven-repo/obr \
138+ --reportjson ${{ github.workspace }}/.galasa/temp/test-2.json \
137139 --log -
138140
139141 - name : Run the ProvisionedAccountCreditTests
@@ -145,18 +147,33 @@ jobs:
145147 --obr mvn:dev.galasa/dev.galasa.uber.obr/${GALASA_VERSION}/obr \
146148 --class dev.galasa.simbank.tests/dev.galasa.simbank.tests.ProvisionedAccountCreditTests \
147149 --remoteMaven https://development.galasa.dev/main/maven-repo/obr \
150+ --reportjson ${{ github.workspace }}/.galasa/temp/test-3.json \
148151 --log -
149152
150- # - name: Report results into Slack channel
151- # env:
152- # SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
153- # run: |
154- # docker run --rm \
155- # --env SLACK_WEBHOOK=${{ env.SLACK_WEBHOOK }} \
156- # -v ${{ github.workspace }}/galasa:/galasa:rw \
157- # ghcr.io/${{ env.NAMESPACE }}/galasabld-ibm:main \
158- # slackpost tests \
159- # --path /galasa/test.json \
160- # --name "Simbank" \
161- # --desc "Tests running locally on GitHub Actions" \
162- # --hook ${{ env.SLACK_WEBHOOK }}
153+ # ----------------------------------------------------------------------------------
154+ # Combine test reports and report to Slack channel
155+ - name : Combine test reports
156+ # Skip this step for forks
157+ # Only report results if this workflow was called from
158+ # a regression run as Main builds run multiple times a day.
159+ if : ${{ github.repository_owner == 'galasa-dev' && github.event_name 'workflow_dispatch' }}
160+ run : |
161+ jq -s '{ tests: map(.tests[]) }' ${{ github.workspace }}/.galasa/temp/test-1.json ${{ github.workspace }}/.galasa/temp/test-2.json ${{ github.workspace }}/.galasa/temp/test-3.json > ${{ github.workspace }}/.galasa/temp/tests.json
162+
163+ - name : Report results into Slack channel
164+ # Skip this step for forks.
165+ # Only report results if this workflow was called from
166+ # a regression run as Main builds run multiple times a day.
167+ if : ${{ github.repository_owner == 'galasa-dev' && github.event_name 'workflow_dispatch' }}
168+ env :
169+ SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
170+ run : |
171+ docker run --rm \
172+ --env SLACK_WEBHOOK=${{ env.SLACK_WEBHOOK }} \
173+ -v ${{ github.workspace }}/.galasa/temp:/galasa:rw \
174+ ghcr.io/${{ env.NAMESPACE }}/galasabld-ibm:main \
175+ slackpost tests \
176+ --path /galasa/tests.json \
177+ --name "Simbank" \
178+ --desc "Tests running locally on GitHub Actions" \
179+ --hook ${{ env.SLACK_WEBHOOK }}
0 commit comments