Build/Test Tools: Make adjustments to how often old branches are tested.

This adjusts the workflow responsible for testing old branches to only test old branches once per month. This more closely resembles the testing practices previously in place on TravisCI.

The latest, supported branch will continue to be tested twice per month.

This also makes adjustments so that the workflow is run whenever changes are made to it. This will help verify changes without having to wait until the next scheduled run.

Fixes #52653.

git-svn-id: https://develop.svn.wordpress.org/trunk@50763 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2021-04-16 17:24:47 +00:00
parent 6caebf6fc2
commit bf17761e70

View File

@ -1,9 +1,17 @@
name: Test old branches
on:
# Once weekly On Mondays at 00:00 UTC.
# Verify the workflow is successful when this file is updated.
push:
branches:
- master
- trunk
paths:
- '.github/workflows/test-old-branches.yml'
# Run twice a month on the 1st and 15th at 00:00 UTC.
schedule:
- cron: '0 0 1,15 * *'
- cron: '0 0 1 * *'
- cron: '0 0 15 * *'
jobs:
dispatch-workflows-for-old-branches:
@ -45,9 +53,11 @@ jobs:
- branch: '3.7'
workflow: 'javascript-tests.yml'
# Run all branches monthly, but only the currently supported one twice per month.
steps:
- name: Dispatch workflow run
uses: actions/github-script@47f7cf65b5ced0830a325f705cad64f2f58dddf7 # v3.1.0
if: ${{ github.event_name == 'push' || github.event.schedule == '0 0 15 * *' || matrix.branch == '5.7' }}
with:
github-token: ${{ secrets.GHA_OLD_BRANCH_DISPATCH }}
script: |