From bf17761e70fd0fe705bb71a87a8ad07a9132514f Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 16 Apr 2021 17:24:47 +0000 Subject: [PATCH] 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 --- .github/workflows/test-old-branches.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-old-branches.yml b/.github/workflows/test-old-branches.yml index 31b706d740..03cd79f4a2 100644 --- a/.github/workflows/test-old-branches.yml +++ b/.github/workflows/test-old-branches.yml @@ -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: |