Build/Test Tools: Limit when GitHub Action workflows run on pull_request.

Different branches have support for different types of testing based on the tooling that was in place at the time each version was branched. The workflows currently in place have patterns configured to match the relevant `branches` and `tags` for each workflow, but only for `push` events.

This copies the patterns for matching supported `branches` over to the `pull_request` event to prevent workflows from running for a pull request to a branch that does not support that workflow.

Fixes #52643.

git-svn-id: https://develop.svn.wordpress.org/trunk@50432 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers
2021-02-24 19:34:41 +00:00
parent 4ae21ee7e0
commit 4a09e7d877
6 changed files with 29 additions and 5 deletions

View File

@@ -1,16 +1,20 @@
name: JavaScript Tests
on:
# JavaScript testing was introduced in WordPress 3.8.
push:
branches:
- master
# JavaScript testing was introduced in WordPress 3.8.
- '3.[89]'
- '[4-9].[0-9]'
tags:
- '3.[89]*'
- '[4-9].[0-9]*'
pull_request:
branches:
- master
- '3.[89]'
- '[4-9].[0-9]'
jobs:
# Runs the QUnit tests for WordPress.