Make WordPress Core

Changeset 53597


Ignore:
Timestamp:
06/30/2022 04:26:30 PM (20 months ago)
Author:
desrosj
Message:

Build/Test Tools: Use the Slack notifications workflow as a reusable one.

This backports several changesets that are required to remove the reliance on the workflow_run event for posting Slack notifications.

The Slack notification workflow will now be called as a reusable one, which has several benefits (see [53591]).

Several other minor GitHub Actions related updates are also being backported in this commit to maintain tooling consistency across branches that still receive security updates as a courtesy when necessary.

Merges [51921], [51924], [51925], [51937], [52002], [52130], [52183], [52233], [53112], [53581], [53582], [53592] to the 5.8 branch.
See #56095.

Location:
branches/5.8
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/.github/workflows/coding-standards.yml

    r51357 r53597  
    66  push:
    77    branches:
    8       - master
    98      - trunk
    109      - '3.[89]'
     
    1514  pull_request:
    1615    branches:
    17       - master
    1816      - trunk
    1917      - '3.[89]'
     
    6159    name: PHP coding standards
    6260    runs-on: ubuntu-latest
     61    timeout-minutes: 20
    6362    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    6463
    6564    steps:
    6665      - name: Checkout repository
    67         uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
     66        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
    6867
    6968      - name: Set up PHP
    70         uses: shivammathur/setup-php@afefcaf556d98dc7896cca380e181decb609ca44 # v2.10.0
     69        uses: shivammathur/setup-php@3eda58347216592f618bb1dff277810b6698e4ca # v2.19.1
    7170        with:
    7271          php-version: '7.4'
     
    8079
    8180      - name: Install Composer dependencies
    82         uses: ramsey/composer-install@92a7904348d4ad30236f3611e33b7f0c6f9edd70 # v1.1.0
     81        uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
    8382        with:
    8483          composer-options: "--no-progress --no-ansi --no-interaction"
     
    105104  # Performs the following steps:
    106105  # - Checks out the repository.
    107   # - Logs debug information about the runner container.
    108   # - Installs NodeJS 14.
     106  # - Logs debug information about the GitHub Action runner.
     107  # - Installs NodeJS.
    109108  # - Sets up caching for NPM.
    110109  # - Logs updated debug information.
    111   # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
     110  # _ Installs NPM dependencies.
    112111  # - Run the WordPress JSHint checks.
    113112  # - Ensures version-controlled files are not modified or deleted.
    114   # - todo: Configure Slack notifications for failing tests.
    115113  jshint:
    116114    name: JavaScript coding standards
    117115    runs-on: ubuntu-latest
     116    timeout-minutes: 20
    118117    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    119118    env:
     
    122121    steps:
    123122      - name: Checkout repository
    124         uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
     123        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
    125124
    126125      - name: Log debug information
     
    132131
    133132      - name: Install NodeJS
    134         uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
     133        uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
    135134        with:
    136           node-version: 14
    137 
    138       - name: Cache NodeJS modules
    139         uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
    140         env:
    141           cache-name: cache-node-modules
    142         with:
    143           # npm cache files are stored in `~/.npm` on Linux/macOS
    144           path: ~/.npm
    145           key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     135          node-version-file: '.nvmrc'
     136          cache: npm
    146137
    147138      - name: Log debug information
     
    158149      - name: Ensure version-controlled files are not modified or deleted
    159150        run: git diff --exit-code
     151
     152  slack-notifications:
     153    name: Slack Notifications
     154    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     155    needs: [ phpcs, jshint ]
     156    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     157    with:
     158      calling_status: ${{ needs.phpcs.result == 'success' && needs.jshint.result == 'success' && 'success' || ( needs.phpcs.result == 'cancelled' || needs.jshint.result == 'cancelled' ) && 'cancelled' || 'failure' }}
     159    secrets:
     160      SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
     161      SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
     162      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
     163      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
  • branches/5.8/.github/workflows/end-to-end-tests.yml

    r51357 r53597  
    22
    33on:
    4   # The end to end test suite was introduced in WordPress 5.3.
     4  # The end-to-end test suite was introduced in WordPress 5.3.
    55  push:
    66    branches:
    7       - master
    87      - trunk
    98      - '5.[3-9]'
     
    1413  pull_request:
    1514    branches:
    16       - master
    1715      - trunk
    1816      - '5.[3-9]'
     
    3432  #
    3533  # Performs the following steps:
    36   # - Set environment variables.
     34  # - Sets environment variables.
    3735  # - Checks out the repository.
    38   # - Logs debug information about the runner container.
    39   # - Installs NodeJS 14.
     36  # - Logs debug information about the GitHub Action runner.
     37  # - Installs NodeJS.
    4038  # - Sets up caching for NPM.
    41   # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
     39  # _ Installs NPM dependencies.
    4240  # - Builds WordPress to run from the `build` directory.
    4341  # - Starts the WordPress Docker container.
     
    4846  # - Run the E2E tests.
    4947  # - Ensures version-controlled files are not modified or deleted.
    50   # - todo: Configure Slack notifications for failing tests.
    5148  e2e-tests:
    5249    name: E2E Tests
    5350    runs-on: ubuntu-latest
     51    timeout-minutes: 20
    5452    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    5553
     
    6159
    6260      - name: Checkout repository
    63         uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
     61        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
    6462
    6563      - name: Log debug information
     
    7573
    7674      - name: Install NodeJS
    77         uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
     75        uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
    7876        with:
    79           node-version: 14
    80 
    81       - name: Cache NodeJS modules
    82         uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
    83         env:
    84           cache-name: cache-node-modules
    85         with:
    86           # npm cache files are stored in `~/.npm` on Linux/macOS
    87           path: ~/.npm
    88           key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     77          node-version-file: '.nvmrc'
     78          cache: npm
    8979
    9080      - name: Install Dependencies
     
    127117      - name: Ensure version-controlled files are not modified or deleted
    128118        run: git diff --exit-code
     119
     120  slack-notifications:
     121    name: Slack Notifications
     122    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     123    needs: [ e2e-tests ]
     124    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     125    with:
     126      calling_status: ${{ needs.e2e-tests.result == 'success' && 'success' || needs.e2e-tests.result == 'cancelled' && 'cancelled' || 'failure' }}
     127    secrets:
     128      SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
     129      SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
     130      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
     131      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
  • branches/5.8/.github/workflows/javascript-tests.yml

    r51357 r53597  
    55  push:
    66    branches:
    7       - master
    87      - trunk
    98      - '3.[89]'
     
    1413  pull_request:
    1514    branches:
    16       - master
    1715      - trunk
    1816      - '3.[89]'
     
    4543  # Performs the following steps:
    4644  # - Checks out the repository.
    47   # - Logs debug information about the runner container.
    48   # - Installs NodeJS 14.
     45  # - Logs debug information about the GitHub Action runner.
     46  # - Installs NodeJS.
    4947  # - Sets up caching for NPM.
    5048  # - Logs updated debug information.
    51   # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
     49  # _ Installs NPM dependencies.
    5250  # - Run the WordPress QUnit tests.
    5351  # - Ensures version-controlled files are not modified or deleted.
    54   # - todo: Configure Slack notifications for failing tests.
    5552  test-js:
    5653    name: QUnit Tests
    5754    runs-on: ubuntu-latest
     55    timeout-minutes: 20
    5856    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    5957
    6058    steps:
    6159      - name: Checkout repository
    62         uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
     60        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
    6361
    6462      - name: Log debug information
     
    7068
    7169      - name: Install NodeJS
    72         uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
     70        uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
    7371        with:
    74           node-version: 14
    75 
    76       - name: Cache NodeJS modules
    77         uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
    78         env:
    79           cache-name: cache-node-modules
    80         with:
    81           # npm cache files are stored in `~/.npm` on Linux/macOS
    82           path: ~/.npm
    83           key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     72          node-version-file: '.nvmrc'
     73          cache: npm
    8474
    8575      - name: Log debug information
     
    9686      - name: Ensure version-controlled files are not modified or deleted
    9787        run: git diff --exit-code
     88
     89  slack-notifications:
     90    name: Slack Notifications
     91    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     92    needs: [ test-js ]
     93    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     94    with:
     95      calling_status: ${{ needs.test-js.result == 'success' && 'success' || needs.test-js.result == 'cancelled' && 'cancelled' || 'failure' }}
     96    secrets:
     97      SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
     98      SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
     99      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
     100      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
  • branches/5.8/.github/workflows/php-compatibility.yml

    r51357 r53597  
    55  push:
    66    branches:
    7       - master
    87      - trunk
    98      - '5.[5-9]'
     
    1413  pull_request:
    1514    branches:
    16       - master
    1715      - trunk
    1816      - '5.[5-9]'
     
    4543  # - Checks out the repository.
    4644  # - Sets up PHP.
    47   # - Logs debug information about the runner container.
     45  # - Logs debug information about the GitHub Action runner.
    4846  # - Installs Composer dependencies (use cache if possible).
    4947  # - Make Composer packages available globally.
     
    5250  # - Ensures version-controlled files are not modified or deleted.
    5351  # - todo: Configure Slack notifications for failing scans.
    54   php-comatibility:
     52  php-compatibility:
    5553    name: Check PHP compatibility
    5654    runs-on: ubuntu-latest
     55    timeout-minutes: 20
    5756    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    5857
    5958    steps:
    6059      - name: Checkout repository
    61         uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
     60        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
    6261
    6362      - name: Set up PHP
    64         uses: shivammathur/setup-php@afefcaf556d98dc7896cca380e181decb609ca44 # v2.10.0
     63        uses: shivammathur/setup-php@3eda58347216592f618bb1dff277810b6698e4ca # v2.19.1
    6564        with:
    6665          php-version: '7.4'
     
    7473
    7574      - name: Install Composer dependencies
    76         uses: ramsey/composer-install@92a7904348d4ad30236f3611e33b7f0c6f9edd70 # v1.1.0
     75        uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
    7776        with:
    7877          composer-options: "--no-progress --no-ansi --no-interaction"
     
    8988      - name: Ensure version-controlled files are not modified or deleted
    9089        run: git diff --exit-code
     90
     91  slack-notifications:
     92    name: Slack Notifications
     93    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     94    needs: [ php-compatibility ]
     95    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     96    with:
     97      calling_status: ${{ needs.php-compatibility.result == 'success' && 'success' || needs.php-compatibility.result == 'cancelled' && 'cancelled' || 'failure' }}
     98    secrets:
     99      SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
     100      SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
     101      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
     102      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
  • branches/5.8/.github/workflows/phpunit-tests.yml

    r51889 r53597  
    44  push:
    55    branches:
    6       - master
    76      - trunk
    87      - '3.[7-9]'
     
    1312  pull_request:
    1413    branches:
    15       - master
    1614      - trunk
    1715      - '3.[7-9]'
     
    4038  #
    4139  # Performs the following steps:
    42   # - Set environment variables.
     40  # - Sets environment variables.
    4341  # - Sets up the environment variables needed for testing with memcached (if desired).
    44   # - Installs NodeJS 14.
     42  # - Installs NodeJS.
    4543  # - Sets up caching for NPM.
    4644  # - Installs NPM dependencies
    4745  # - Configures caching for Composer.
    48   # - Installs Composer dependencies (if desired).
    49   # - Logs Docker debug information (about both the Docker installation within the runner).
     46  # - Installs Composer dependencies.
     47  # - Logs Docker debug information (about the Docker installation within the runner).
    5048  # - Starts the WordPress Docker container.
    51   # - Starts the memcached server after the Docker network has been created (if desired).
    52   # - Logs WordPress Docker container debug information.
    53   # - Logs debug general information.
     49  # - Starts the Memcached server after the Docker network has been created (if desired).
     50  # - Logs general debug information about the runner.
    5451  # - Logs the running Docker containers.
     52  # - Logs debug information from inside the WordPress Docker container.
    5553  # - Logs debug information about what's installed within the WordPress Docker containers.
    5654  # - Install WordPress within the Docker container.
     
    6058  # - Reconnect the directory to the Git repository.
    6159  # - Submit the test results to the WordPress.org host test results.
    62   # - todo: Configure Slack notifications for failing tests.
    6360  test-php:
    6461    name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }}
    6562    runs-on: ${{ matrix.os }}
     63    timeout-minutes: 20
    6664    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    6765    strategy:
     
    112110
    113111      - name: Checkout repository
    114         uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
     112        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
    115113
    116114      - name: Install NodeJS
    117         uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
     115        uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
    118116        with:
    119           node-version: 14
    120 
    121       - name: Use cached Node modules
    122         uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
    123         env:
    124           cache-name: cache-node-modules
    125         with:
    126           # npm cache files are stored in `~/.npm` on Linux/macOS
    127           path: ~/.npm
    128           key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     117          node-version-file: '.nvmrc'
     118          cache: npm
    129119
    130120      - name: Install Dependencies
     
    136126
    137127      - name: Cache Composer dependencies
    138         uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
     128        uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
    139129        env:
    140130          cache-name: cache-composer-dependencies
     
    238228
    239229      - name: Checkout the WordPress Test Reporter
    240         if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
    241         uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
     230        if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }}
     231        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
    242232        with:
    243233          repository: 'WordPress/phpunit-test-runner'
     
    245235
    246236      - name: Submit test results to the WordPress.org host test results
    247         if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
     237        if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }}
    248238        env:
    249239          WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}"
    250240        run: docker-compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php
     241
     242  slack-notifications:
     243    name: Slack Notifications
     244    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     245    needs: [ test-php ]
     246    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     247    with:
     248      calling_status: ${{ needs.test-php.result == 'success' && 'success' || needs.test-php.result == 'cancelled' && 'cancelled' || 'failure' }}
     249    secrets:
     250      SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
     251      SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
     252      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
     253      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
  • branches/5.8/.github/workflows/test-npm.yml

    r51357 r53597  
    44  push:
    55    branches:
    6       - master
    76      - trunk
    87      - '3.[7-9]'
     
    109  pull_request:
    1110    branches:
    12       - master
    1311      - trunk
    1412      - '3.[7-9]'
     
    4139  # Performs the following steps:
    4240  # - Checks out the repository.
    43   # - Logs debug information about the runner container.
    44   # - Installs NodeJS 14.
     41  # - Logs debug information about the GitHub Action runner.
     42  # - Installs NodeJS.
    4543  # - Sets up caching for NPM.
    46   # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
     44  # _ Installs NPM dependencies.
    4745  # - Builds WordPress to run from the `build` directory.
    4846  # - Cleans up after building WordPress to the `build` directory.
     
    5452    name: Test NPM on ${{ matrix.os }}
    5553    runs-on: ${{ matrix.os }}
     54    timeout-minutes: 20
    5655    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    5756    strategy:
     
    6261    steps:
    6362      - name: Checkout repository
    64         uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
     63        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
    6564
    6665      - name: Log debug information
     
    7372
    7473      - name: Install NodeJS
    75         uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
     74        uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
    7675        with:
    77           node-version: 14
    78 
    79       - name: Cache NodeJS modules (Ubuntu & MacOS)
    80         uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
    81         if: ${{ matrix.os != 'windows-latest' }}
    82         with:
    83           path: ~/.npm
    84           key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
    85 
    86       - name: Get NPM cache directory (Windows only)
    87         if: ${{ matrix.os == 'windows-latest' }}
    88         id: npm-cache
    89         run: echo "::set-output name=dir::$(npm config get cache)"
    90 
    91       - name: Cache NodeJS modules (Windows only)
    92         uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
    93         if: ${{ matrix.os == 'windows-latest' }}
    94         with:
    95           path: ${{ steps.npm-cache.outputs.dir }}
    96           key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     76          node-version-file: '.nvmrc'
     77          cache: npm
    9778
    9879      - name: Install Dependencies
     
    119100  # Verifies that installing NPM dependencies and building WordPress works as expected on MacOS.
    120101  #
    121   # This is a separate job in order to that more strict conditions can be used.
     102  # This is separate from the job above in order to use stricter conditions about when to run.
     103  # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate.
    122104  #
    123105  # Performs the following steps:
    124106  # - Checks out the repository.
    125   # - Logs debug information about the runner container.
    126   # - Installs NodeJS 14.
     107  # - Logs debug information about the GitHub Action runner.
     108  # - Installs NodeJS.
    127109  # - Sets up caching for NPM.
    128   # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
     110  # _ Installs NPM dependencies.
    129111  # - Builds WordPress to run from the `build` directory.
    130112  # - Cleans up after building WordPress to the `build` directory.
     
    136118    name: Test NPM on MacOS
    137119    runs-on: macos-latest
     120    timeout-minutes: 20
    138121    if: ${{ github.repository == 'WordPress/wordpress-develop' }}
    139122    steps:
    140123      - name: Checkout repository
    141         uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
     124        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
    142125
    143126      - name: Log debug information
     
    150133
    151134      - name: Install NodeJS
    152         uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
     135        uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
    153136        with:
    154           node-version: 14
    155 
    156       - name: Cache NodeJS modules
    157         uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
    158         if: ${{ matrix.os != 'windows-latest' }}
    159         with:
    160           path: ~/.npm
    161           key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     137          node-version-file: '.nvmrc'
     138          cache: npm
    162139
    163140      - name: Install Dependencies
     
    181158      - name: Ensure version-controlled files are not modified or deleted during building and cleaning
    182159        run: git diff --exit-code
     160
     161  slack-notifications:
     162    name: Slack Notifications
     163    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     164    needs: [ test-npm, test-npm-macos ]
     165    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     166    with:
     167      calling_status: ${{ needs.test-npm.result == 'success' && needs.test-npm-macos.result == 'success' && 'success' || ( needs.test-npm.result == 'cancelled' || needs.test-npm-macos.result == 'cancelled' ) && 'cancelled' || 'failure' }}
     168    secrets:
     169      SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
     170      SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
     171      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
     172      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
  • branches/5.8/.github/workflows/welcome-new-contributors.yml

    r50486 r53597  
    99  post-welcome-message:
    1010    runs-on: ubuntu-latest
     11    timeout-minutes: 5
    1112    if: ${{ github.repository == 'WordPress/wordpress-develop' }}
    1213
Note: See TracChangeset for help on using the changeset viewer.