Make WordPress Core


Ignore:
Timestamp:
03/10/2023 04:31:29 PM (14 months ago)
Author:
desrosj
Message:

Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

  • address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
  • adds support for automatically retrying a failed workflow once.
  • removes workflow files that are not applicable to the branch.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 4.2 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

Location:
branches/4.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2

  • branches/4.2/.github/workflows/phpunit-tests.yml

    r53619 r55534  
    88      - '[4-9].[0-9]'
    99    tags:
    10       - '3.[7-9]*'
    11       - '[4-9].[0-9]*'
     10      - '[0-9]+.[0-9]'
     11      - '[0-9]+.[0-9].[0-9]+'
    1212  pull_request:
    1313    branches:
     
    3131  PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
    3232  COMPOSER_INSTALL: ${{ false }}
    33   # Controls which NPM script to use for running PHPUnit tests. Options ar `php` and `php-composer`.
     33  # Controls which npm script to use for running PHPUnit tests. Options ar `php` and `php-composer`.
    3434  PHPUNIT_SCRIPT: php
    3535  LOCAL_PHP_MEMCACHED: ${{ false }}
     
    4444  # - Logs debug information about the GitHub Action runner.
    4545  # - Installs NodeJS.
    46   # _ Installs NPM dependencies.
     46  # _ Installs npm dependencies.
    4747  # - Builds WordPress to run from the `build` directory.
    4848  # - Creates a ZIP file of compiled WordPress.
     
    5555    steps:
    5656      - name: Checkout repository
    57         uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
     57        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    5858
    5959      - name: Log debug information
     
    7070          locale -a
    7171
    72       - name: Install NodeJS
    73         uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
     72      - name: Set up Node.js
     73        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    7474        with:
    7575          node-version-file: '.nvmrc'
     
    8383
    8484      - name: Create ZIP artifact
    85         uses: thedoctor0/zip-release@09336613be18a8208dfa66bd57efafd9e2685657 # v0.6.2
     85        uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # v0.7.1
    8686        with:
    8787          filename: built-wp-${{ github.sha }}.zip
     
    8989
    9090      - name: Upload build artifact
    91         uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
     91        uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
    9292        with:
    9393          name: built-wp-${{ github.sha }}
     
    103103  # - Unzips the artifact.
    104104  # - Installs NodeJS.
    105   # _ Installs NPM dependencies.
     105  # _ Installs npm dependencies.
    106106  # - Configures caching for Composer.
    107107  # _ Installs Composer dependencies (if desired).
     
    172172
    173173      - name: Download the built WordPress artifact
    174         uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
     174        uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
    175175        with:
    176176          name: built-wp-${{ github.sha }}
     
    179179        run: unzip built-wp-${{ github.sha }}.zip
    180180
    181       - name: Install NodeJS
    182         uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
     181      - name: Set up Node.js
     182        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    183183        with:
    184184          node-version-file: '.nvmrc'
     
    190190      - name: Cache Composer dependencies
    191191        if: ${{ env.COMPOSER_INSTALL == true }}
    192         uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
     192        uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
    193193        env:
    194194          cache-name: cache-composer-dependencies
     
    271271      - name: Checkout the WordPress Test Reporter
    272272        if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }}
    273         uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
     273        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    274274        with:
    275275          repository: 'WordPress/phpunit-test-runner'
     
    302302      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
    303303      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
     304
     305  failed-workflow:
     306    name: Failed workflow tasks
     307    runs-on: ubuntu-latest
     308    needs: [ test-php, slack-notifications ]
     309    if: |
     310      always() &&
     311      github.repository == 'WordPress/wordpress-develop' &&
     312      github.event_name != 'pull_request' &&
     313      github.run_attempt < 2 &&
     314      (
     315        needs.test-php.result == 'cancelled' || needs.test-php.result == 'failure'
     316      )
     317
     318    steps:
     319      - name: Dispatch workflow run
     320        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     321        with:
     322          retries: 2
     323          retry-exempt-status-codes: 418
     324          script: |
     325            github.rest.actions.createWorkflowDispatch({
     326              owner: context.repo.owner,
     327              repo: context.repo.repo,
     328              workflow_id: 'failed-workflow.yml',
     329              ref: 'trunk',
     330              inputs: {
     331                run_id: '${{ github.run_id }}'
     332              }
     333            });
Note: See TracChangeset for help on using the changeset viewer.