Make WordPress Core


Ignore:
Timestamp:
03/07/2023 07:36:29 PM (19 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.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53628], [53636], [53736], [53737], [53895], [53940], [53947], [54039], [54096], [54108], [54293], [54297], [54313], [54342], [54343], [54371], [54373], [54511], [54649], [54650], [54674], [54678], [54750], [54851], [54852], [54856], [54921], [55152] to the 6.0 branch.
See 55702, #52708, #55652, #55652, #55700, #55652, #56407, #56407, #56528, #55652, #55652, #55652, #54695, #55652, #55652, #55652, #55652, #56820, #56820, #56816, #55652, #55652, #56820, #56793, #56793, #53841, #57148, #57572, #56682.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/6.0/.github/workflows/javascript-tests.yml

    r53595 r55482  
    1919      # Any change to a JavaScript file should run tests.
    2020      - '**.js'
    21       # These files configure NPM. Changes could affect the outcome.
     21      # These files configure npm. Changes could affect the outcome.
    2222      - 'package*.json'
    2323      # This file configures ESLint. Changes could affect the outcome.
     
    4343  # Performs the following steps:
    4444  # - Checks out the repository.
     45  # - Sets up Node.js.
    4546  # - Logs debug information about the GitHub Action runner.
    46   # - Installs NodeJS.
    47   # - Logs updated debug information.
    48   # _ Installs NPM dependencies.
     47  # - Installs npm dependencies.
    4948  # - Run the WordPress QUnit tests.
    5049  # - Ensures version-controlled files are not modified or deleted.
     
    5756    steps:
    5857      - name: Checkout repository
    59         uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
     58        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
     59
     60      - name: Set up Node.js
     61        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
     62        with:
     63          node-version-file: '.nvmrc'
     64          cache: npm
    6065
    6166      - name: Log debug information
     
    6671          svn --version
    6772
    68       - name: Install NodeJS
    69         uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
    70         with:
    71           node-version-file: '.nvmrc'
    72           cache: npm
    73 
    74       - name: Log debug information
    75         run: |
    76           npm --version
    77           node --version
    78 
    79       - name: Install Dependencies
     73      - name: Install npm Dependencies
    8074        run: npm ci
    8175
     
    9892      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
    9993      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
     94
     95  failed-workflow:
     96    name: Failed workflow tasks
     97    runs-on: ubuntu-latest
     98    needs: [ test-js, slack-notifications ]
     99    if: |
     100      always() &&
     101      github.repository == 'WordPress/wordpress-develop' &&
     102      github.event_name != 'pull_request' &&
     103      github.run_attempt < 2 &&
     104      (
     105        needs.test-js.result == 'cancelled' || needs.test-js.result == 'failure'
     106      )
     107
     108    steps:
     109      - name: Dispatch workflow run
     110        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     111        with:
     112          retries: 2
     113          retry-exempt-status-codes: 418
     114          script: |
     115            github.rest.actions.createWorkflowDispatch({
     116              owner: context.repo.owner,
     117              repo: context.repo.repo,
     118              workflow_id: 'failed-workflow.yml',
     119              ref: 'trunk',
     120              inputs: {
     121                run_id: '${{ github.run_id }}'
     122              }
     123            });
Note: See TracChangeset for help on using the changeset viewer.