@@ -34,12 +34,12 @@ jobs:
3434 - uses : 8398a7/action-slack@v3
3535 with :
3636 status : custom
37- fields : workflow,job, commit,repo,ref,author,took
37+ fields : workflow,commit,repo,ref,author
3838 custom_payload : |
3939 {
4040 attachments: [{
4141 color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
42- text: `${process.env.AS_WORKFLOW}/${{ github.job }} ${{ job.status }} in ${process.env.AS_TOOK} \n${process.env.AS_COMMIT} in ${process.env.AS_REF}`,
42+ text: `${process.env.AS_WORKFLOW}/${{ github.job }} ${{ job.status }}\n${process.env.AS_COMMIT} in ${process.env.AS_REF}`
4343 }]
4444 }
4545 env :
7373 id : split_subjects
7474 working-directory : ${{ env.WORKING_DIRECTORY }}
7575 run : |
76- # Ensure database is ready before listing subjects
7776 echo "Waiting for PostgreSQL to be ready..."
7877 until pg_isready -h localhost -p 5432 -U "postgres" -d "cqrs-es-sample-with-res_test"; do
7978 sleep 1
@@ -101,7 +100,7 @@ jobs:
101100 fi
102101
103102 total_subjects=${#subjects_array[@]}
104- NUM_GROUPS=24 # Define the number of parallel jobs
103+ NUM_GROUPS=32 # Define the number of parallel jobs
105104 groups_json_array_content=""
106105
107106 for (( i=0; i<NUM_GROUPS; i++ )); do
@@ -156,23 +155,36 @@ jobs:
156155 working-directory : ${{ env.WORKING_DIRECTORY }}
157156 env :
158157 CI_MUTATE_SUBJECTS : ${{ matrix.subject_group }}
159- - name : Set Shard Display Index
160- run : echo "SHARD_DISPLAY_INDEX=$(( ${{ strategy['job-index'] }} + 1 ))" >> $GITHUB_ENV
161- - uses : 8398a7/action-slack@v3
158+
159+ notify_rails_mutation_summary :
160+ runs-on : ubuntu-24.04
161+ needs : [mutate, prepare_mutation_subjects_rails]
162+ if : always() && needs.prepare_mutation_subjects_rails.outputs.subject_groups != '[]' && needs.prepare_mutation_subjects_rails.outputs.subject_groups != ''
163+ steps :
164+ - name : Determine notification color
165+ id : set_color
166+ run : |
167+ if [[ "${{ needs.mutate.result }}" == "success" ]]; then
168+ echo "NOTIFICATION_COLOR=good" >> $GITHUB_ENV
169+ elif [[ "${{ needs.mutate.result }}" == "failure" ]]; then
170+ echo "NOTIFICATION_COLOR=danger" >> $GITHUB_ENV
171+ else
172+ echo "NOTIFICATION_COLOR=warning" >> $GITHUB_ENV
173+ fi
174+ - name : Send mutation summary notification
175+ uses : 8398a7/action-slack@v3
162176 with :
163177 status : custom
164178 fields : workflow,commit,repo,ref,author
165179 custom_payload : |
166180 {
167- attachments: [{
168- color: ' ${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning' ,
169- text: `${process.env.AS_WORKFLOW}/${{ github.job }} (shard ${{ env.SHARD_DISPLAY_INDEX }}/ ${{ strategy.job-total }}) ${{ job.status }}\n${process.env.AS_COMMIT} in ${process.env.AS_REF}`,
181+ " attachments" : [{
182+ " color": " ${{ env.NOTIFICATION_COLOR }}" ,
183+ " text": "rails_application Mutation Test Summary:\nStatus: ${{ needs.mutate.result }}\nWorkflow: ${{ github.workflow }}\nCommit: ${{ github.sha }} in ${{ github.ref }}"
170184 }]
171185 }
172186 env :
173187 SLACK_WEBHOOK_URL : ${{ secrets.CI_WEBHOOK }}
174- if : always()
175- continue-on-error : true
176188
177189 release :
178190 runs-on : ubuntu-24.04
0 commit comments