Changeset 55523 for branches/5.2/.github/workflows/test-npm.yml
- Timestamp:
- 03/10/2023 04:10:01 PM (21 months ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
- Property svn:mergeinfo changed
/trunk merged: 53736-53737,53940,53947,54039,54096,54108,54293,54313,54342-54343,54373,54511,54649-54651,54674,54750,54852,55152,55487
- Property svn:mergeinfo changed
-
branches/5.2/.github/workflows/test-npm.yml
r53603 r55523 1 name: Test NPM1 name: Test npm 2 2 3 3 on: … … 7 7 - '3.[7-9]' 8 8 - '[4-9].[0-9]' 9 tags: 10 - '[0-9]+.[0-9]' 11 - '[0-9]+.[0-9].[0-9]+' 9 12 pull_request: 10 13 branches: … … 13 16 - '[4-9].[0-9]' 14 17 paths: 15 # These files configure NPM. Changes could affect the outcome.18 # These files configure npm. Changes could affect the outcome. 16 19 - 'package*.json' 17 # JavaScript files are built using NPM.20 # JavaScript files are built using npm. 18 21 - '**.js' 19 # CSS and SCSS files are built using NPM.22 # CSS and SCSS files are built using npm. 20 23 - '**.scss' 21 24 - '**.css' … … 35 38 36 39 jobs: 37 # Verifies that installing NPMdependencies and building WordPress works as expected.40 # Verifies that installing npm dependencies and building WordPress works as expected. 38 41 # 39 42 # Performs the following steps: 40 43 # - Checks out the repository. 41 44 # - Logs debug information about the GitHub Action runner. 42 # - Installs Node JS.43 # _ Installs NPMdependencies.45 # - Installs Node.js. 46 # _ Installs npm dependencies. 44 47 # - Builds WordPress to run from the `build` directory. 45 48 # - Cleans up after building WordPress to the `build` directory. … … 47 50 # - Cleans up after building WordPress to the `src` directory. 48 51 test-npm: 49 name: Test NPMon ${{ matrix.os }}52 name: Test npm on ${{ matrix.os }} 50 53 runs-on: ${{ matrix.os }} 51 54 timeout-minutes: 20 … … 58 61 steps: 59 62 - name: Checkout repository 60 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.263 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 61 64 62 65 - name: Log debug information … … 68 71 svn --version 69 72 70 - name: Install Node JS71 uses: actions/setup-node@ eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.073 - name: Install Node.js 74 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 72 75 with: 73 76 node-version-file: '.nvmrc' … … 89 92 run: npm run grunt clean -- --dev 90 93 91 # Verifies that installing NPMdependencies and building WordPress works as expected on MacOS.94 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 92 95 # 93 96 # This is separate from the job above in order to use stricter conditions about when to run. 94 97 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 95 98 # 99 # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is 100 # currently no way to determine the OS being used on a given job. 101 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 102 # 96 103 # Performs the following steps: 97 104 # - Checks out the repository. 98 105 # - Logs debug information about the GitHub Action runner. 99 # - Installs Node JS.100 # _ Installs NPMdependencies.106 # - Installs Node.js. 107 # _ Installs npm dependencies. 101 108 # - Builds WordPress to run from the `build` directory. 102 109 # - Cleans up after building WordPress to the `build` directory. … … 104 111 # - Cleans up after building WordPress to the `src` directory. 105 112 test-npm-macos: 106 name: Test NPMon MacOS113 name: Test npm on MacOS 107 114 runs-on: macos-latest 108 timeout-minutes: 20115 timeout-minutes: 30 109 116 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 110 117 steps: 111 118 - name: Checkout repository 112 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2119 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 113 120 114 121 - name: Log debug information … … 120 127 svn --version 121 128 122 - name: Install Node JS123 uses: actions/setup-node@ eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0129 - name: Install Node.js 130 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 124 131 with: 125 132 node-version-file: '.nvmrc' … … 153 160 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 154 161 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 162 163 failed-workflow: 164 name: Failed workflow tasks 165 runs-on: ubuntu-latest 166 needs: [ test-npm, test-npm-macos, slack-notifications ] 167 if: | 168 always() && 169 github.repository == 'WordPress/wordpress-develop' && 170 github.event_name != 'pull_request' && 171 github.run_attempt < 2 && 172 ( 173 needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure' || 174 needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure' 175 ) 176 177 steps: 178 - name: Dispatch workflow run 179 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 180 with: 181 retries: 2 182 retry-exempt-status-codes: 418 183 script: | 184 github.rest.actions.createWorkflowDispatch({ 185 owner: context.repo.owner, 186 repo: context.repo.repo, 187 workflow_id: 'failed-workflow.yml', 188 ref: 'trunk', 189 inputs: { 190 run_id: '${{ github.run_id }}' 191 } 192 });
Note: See TracChangeset
for help on using the changeset viewer.