Make WordPress Core


Ignore:
Timestamp:
07/11/2023 04:08:03 AM (14 months ago)
Author:
peterwilsoncc
Message:

Build/Test Tools: Suppress E2E test suite Slack notifications.

Remove Slack notifications of E2E test suite failures while the tests are flakey to improve the signal-to-noise ratio.

Fixes #58779.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/end-to-end-tests.yml

    r56114 r56198  
    127127      - name: Ensure version-controlled files are not modified or deleted
    128128        run: git diff --exit-code
    129 
    130   slack-notifications:
    131     name: Slack Notifications
    132     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
    133     permissions:
    134       actions: read
    135       contents: read
    136     needs: [ e2e-tests ]
    137     if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
    138     with:
    139       calling_status: ${{ needs.e2e-tests.result == 'success' && 'success' || needs.e2e-tests.result == 'cancelled' && 'cancelled' || 'failure' }}
    140     secrets:
    141       SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
    142       SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
    143       SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
    144       SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
    145 
    146   failed-workflow:
    147     name: Failed workflow tasks
    148     runs-on: ubuntu-latest
    149     permissions:
    150       actions: write
    151     needs: [ e2e-tests, slack-notifications ]
    152     if: |
    153       always() &&
    154       github.repository == 'WordPress/wordpress-develop' &&
    155       github.event_name != 'pull_request' &&
    156       github.run_attempt < 2 &&
    157       (
    158         needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure'
    159       )
    160 
    161     steps:
    162       - name: Dispatch workflow run
    163         uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
    164         with:
    165           retries: 2
    166           retry-exempt-status-codes: 418
    167           script: |
    168             github.rest.actions.createWorkflowDispatch({
    169               owner: context.repo.owner,
    170               repo: context.repo.repo,
    171               workflow_id: 'failed-workflow.yml',
    172               ref: 'trunk',
    173               inputs: {
    174                 run_id: '${{ github.run_id }}'
    175               }
    176             });
Note: See TracChangeset for help on using the changeset viewer.