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,17 +1,21 @@
name: Coding Standards
on:
# JSHint was introduced in WordPress 3.8.
# PHPCS checking was introduced in WordPress 5.1.
push:
branches:
- master
# JSHint was introduced in WordPress 3.8.
# PHPCS checking was introduced in WordPress 5.1.
- '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 PHP coding standards checks.

View File

@ -1,16 +1,20 @@
name: End-to-end Tests
on:
# The end to end test suite was introduced in WordPress 5.3.
push:
branches:
- master
# The end to end test suite was introduced in WordPress 5.3.
- '5.[3-9]'
- '[6-9].[0-9]'
tags:
- '5.[3-9]*'
- '[6-9].[0-9]*'
pull_request:
branches:
- master
- '5.[3-9]'
- '[6-9].[0-9]'
env:
LOCAL_DIR: build

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.

View File

@ -1,16 +1,20 @@
name: PHP Compatibility
on:
# PHP compatibility testing was introduced in WordPress 5.5.
push:
branches:
- master
# The PHP compatibility testing was introduced in WordPress 5.5.
- '5.[5-9]'
- '[6-9].[0-9]'
tags:
- '5.[5-9]*'
- '[6-9].[0-9]*'
pull_request:
branches:
- master
- '5.[5-9]'
- '[6-9].[0-9]'
jobs:

View File

@ -10,6 +10,10 @@ on:
- '3.[7-9]*'
- '[4-9].[0-9]*'
pull_request:
branches:
- master
- '3.[7-9]'
- '[4-9].[0-9]'
# Once weekly On Sundays at 00:00 UTC.
schedule:
- cron: '0 0 * * 0'

View File

@ -7,6 +7,10 @@ on:
- '3.[7-9]'
- '[4-9].[0-9]'
pull_request:
branches:
- master
- '3.[7-9]'
- '[4-9].[0-9]'
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}