2021-03-26 13:06:43 +00:00
|
|
|
name: Test old branches
|
|
|
|
|
|
|
|
on:
|
2021-04-16 17:24:47 +00:00
|
|
|
# Verify the workflow is successful when this file is updated.
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- trunk
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/test-old-branches.yml'
|
|
|
|
# Run twice a month on the 1st and 15th at 00:00 UTC.
|
2021-03-26 13:06:43 +00:00
|
|
|
schedule:
|
2021-04-16 17:24:47 +00:00
|
|
|
- cron: '0 0 1 * *'
|
|
|
|
- cron: '0 0 15 * *'
|
2021-03-26 13:06:43 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
dispatch-workflows-for-old-branches:
|
|
|
|
name: ${{ matrix.workflow }} for ${{ matrix.branch }}
|
|
|
|
runs-on: ubuntu-latest
|
2021-11-23 17:40:00 +00:00
|
|
|
timeout-minutes: 20
|
2021-04-02 16:20:24 +00:00
|
|
|
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
|
2021-03-26 13:06:43 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
workflow: [
|
|
|
|
'coding-standards.yml',
|
|
|
|
'javascript-tests.yml',
|
|
|
|
'phpunit-tests.yml',
|
|
|
|
'test-npm.yml'
|
|
|
|
]
|
|
|
|
branch: [
|
2022-10-18 20:03:57 +00:00
|
|
|
'6.1','6.0',
|
2022-01-04 21:29:57 +00:00
|
|
|
'5.9', '5.8', '5.7', '5.6', '5.5', '5.4', '5.3', '5.2', '5.1', '5.0',
|
2022-12-15 05:02:04 +00:00
|
|
|
'4.9', '4.8', '4.7', '4.6', '4.5', '4.4', '4.3', '4.2', '4.1'
|
2021-03-26 13:06:43 +00:00
|
|
|
]
|
|
|
|
include:
|
|
|
|
# PHP Compatibility testing was introduced in 5.5.
|
2022-10-18 20:03:57 +00:00
|
|
|
- branch: '6.1'
|
|
|
|
workflow: 'php-compatibility.yml'
|
2022-05-03 17:42:22 +00:00
|
|
|
- branch: '6.0'
|
|
|
|
workflow: 'php-compatibility.yml'
|
2022-01-04 21:29:57 +00:00
|
|
|
- branch: '5.9'
|
|
|
|
workflow: 'php-compatibility.yml'
|
2021-06-30 03:57:04 +00:00
|
|
|
- branch: '5.8'
|
|
|
|
workflow: 'php-compatibility.yml'
|
2021-03-26 13:06:43 +00:00
|
|
|
- branch: '5.7'
|
|
|
|
workflow: 'php-compatibility.yml'
|
|
|
|
- branch: '5.6'
|
|
|
|
workflow: 'php-compatibility.yml'
|
|
|
|
- branch: '5.5'
|
|
|
|
workflow: 'php-compatibility.yml'
|
|
|
|
|
2022-01-10 16:43:54 +00:00
|
|
|
# End-to-end testing was introduced in 5.3 but was later removed as there were no meaningful assertions.
|
|
|
|
# Starting in 5.8 with #52905, some additional tests with real assertions were introduced.
|
|
|
|
# Branches 5.8 and newer should be tested to confirm no regressions are introduced.
|
2022-10-18 20:03:57 +00:00
|
|
|
- branch: '6.1'
|
|
|
|
workflow: 'end-to-end-tests.yml'
|
2022-05-03 17:42:22 +00:00
|
|
|
- branch: '6.0'
|
|
|
|
workflow: 'end-to-end-tests.yml'
|
2022-01-04 21:29:57 +00:00
|
|
|
- branch: '5.9'
|
2021-03-26 13:06:43 +00:00
|
|
|
workflow: 'end-to-end-tests.yml'
|
2022-01-10 16:43:54 +00:00
|
|
|
- branch: '5.8'
|
|
|
|
workflow: 'end-to-end-tests.yml'
|
2021-03-26 13:06:43 +00:00
|
|
|
|
2021-04-16 17:24:47 +00:00
|
|
|
# Run all branches monthly, but only the currently supported one twice per month.
|
2021-03-26 13:06:43 +00:00
|
|
|
steps:
|
|
|
|
- name: Dispatch workflow run
|
2023-01-27 19:23:20 +00:00
|
|
|
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
|
2022-10-18 20:03:57 +00:00
|
|
|
if: ${{ github.event_name == 'push' || github.event.schedule == '0 0 15 * *' || matrix.branch == '6.1' }}
|
2021-03-26 13:06:43 +00:00
|
|
|
with:
|
2022-09-28 01:53:48 +00:00
|
|
|
retries: 2
|
|
|
|
retry-exempt-status-codes: 418
|
2021-03-26 13:06:43 +00:00
|
|
|
script: |
|
2021-11-16 16:08:03 +00:00
|
|
|
github.rest.actions.createWorkflowDispatch({
|
2021-03-26 13:06:43 +00:00
|
|
|
owner: context.repo.owner,
|
|
|
|
repo: context.repo.repo,
|
|
|
|
workflow_id: '${{ matrix.workflow }}',
|
|
|
|
ref: '${{ matrix.branch }}'
|
|
|
|
});
|
2021-10-20 14:40:47 +00:00
|
|
|
|
|
|
|
slack-notifications:
|
|
|
|
name: Slack Notifications
|
2021-11-10 20:58:15 +00:00
|
|
|
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
|
2021-10-20 14:40:47 +00:00
|
|
|
needs: [ dispatch-workflows-for-old-branches ]
|
2021-10-25 20:26:45 +00:00
|
|
|
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
|
2021-11-03 14:54:20 +00:00
|
|
|
with:
|
|
|
|
calling_status: ${{ needs.dispatch-workflows-for-old-branches.result == 'success' && 'success' || needs.dispatch-workflows-for-old-branches.result == 'cancelled' && 'cancelled' || 'failure' }}
|
2021-10-20 19:25:12 +00:00
|
|
|
secrets:
|
|
|
|
SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
|
|
|
|
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
|
|
|
|
SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
|
|
|
|
SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
|