From 4e72f78c75819470cb8f6d5d5d16f9ef8c9a7a0c Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 16 Nov 2022 20:55:34 +0000 Subject: [PATCH] Build/Test Tools: Add additional details why MacOS jobs are separate. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds additional inline context as to why the MacOS job is separate from the Windows and Ubuntu ones in the Test npm workflow. While it is preferable to combine all of these to avoid repeated code, there is currently no way to determine the runner’s OS within the `if` workflow key. MacOS jobs use GitHub Action minutes at by a multiple of 10. Being more strict about when to run these jobs ensures minutes are not unintentionally consumed within private forks and mirrors. See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability for more details. See #56793. git-svn-id: https://develop.svn.wordpress.org/trunk@54852 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/test-npm.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test-npm.yml b/.github/workflows/test-npm.yml index 0120ef8853..59b8adcaef 100644 --- a/.github/workflows/test-npm.yml +++ b/.github/workflows/test-npm.yml @@ -104,6 +104,10 @@ jobs: # This is separate from the job above in order to use stricter conditions about when to run. # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. # + # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is + # currently no way to determine the OS being used on a given job. + # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. + # # Performs the following steps: # - Checks out the repository. # - Sets up Node.js.