Changeset 55535 for branches/4.1/.github/workflows/test-npm.yml
- Timestamp:
- 03/10/2023 04:31:59 PM (19 months ago)
- Location:
- branches/4.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1
- Property svn:mergeinfo changed
/trunk merged: 53736-53737,53940,53947,54039,54096,54108,54293,54313,54342-54343,54373,54511,54650-54651,54674,54750,54852,55152,55487
- Property svn:mergeinfo changed
-
branches/4.1/.github/workflows/test-npm.yml
r53620 r55535 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: … … 41 44 # - Logs debug information about the GitHub Action runner. 42 45 # - Installs NodeJS. 43 # - Sets up caching for NPM.44 # _ Installs NPMdependencies.46 # - Sets up caching for npm. 47 # _ Installs npm dependencies. 45 48 # - Builds WordPress to run from the `build` directory. 46 49 # - Cleans up after building WordPress to the `build` directory. 47 50 test-npm: 48 name: Test NPMon ${{ matrix.os }}51 name: Test npm on ${{ matrix.os }} 49 52 runs-on: ${{ matrix.os }} 50 53 timeout-minutes: 20 … … 56 59 steps: 57 60 - name: Checkout repository 58 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.261 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 59 62 60 63 - name: Log debug information … … 66 69 svn --version 67 70 68 - name: Install NodeJS69 uses: actions/setup-node@ eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.071 - name: Set up Node.js 72 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 70 73 with: 71 74 node-version-file: '.nvmrc' … … 81 84 run: npm run grunt clean 82 85 83 # Verifies that installing NPMdependencies and building WordPress works as expected on MacOS.86 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 84 87 # 85 88 # This is separate from the job above in order to use stricter conditions about when to run. 86 89 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 90 # 91 # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is 92 # currently no way to determine the OS being used on a given job. 93 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 87 94 # 88 95 # Performs the following steps: … … 90 97 # - Logs debug information about the GitHub Action runner. 91 98 # - Installs NodeJS. 92 # _ Installs NPMdependencies.99 # _ Installs npm dependencies. 93 100 # - Builds WordPress to run from the `build` directory. 94 101 # - Cleans up after building WordPress to the `build` directory. 95 102 test-npm-macos: 96 name: Test NPMon MacOS103 name: Test npm on MacOS 97 104 runs-on: macos-latest 105 timeout-minutes: 30 98 106 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 99 107 steps: 100 108 - name: Checkout repository 101 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2109 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 102 110 103 111 - name: Log debug information … … 109 117 svn --version 110 118 111 - name: Install NodeJS112 uses: actions/setup-node@ eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0119 - name: Set up Node.js 120 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 113 121 with: 114 122 node-version-file: '.nvmrc' … … 136 144 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 137 145 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 146 147 failed-workflow: 148 name: Failed workflow tasks 149 runs-on: ubuntu-latest 150 needs: [ test-npm, test-npm-macos, slack-notifications ] 151 if: | 152 always() && 153 github.repository == 'WordPress/wordpress-develop' && 154 github.event_name != 'pull_request' && 155 github.run_attempt < 2 && 156 ( 157 needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure' || 158 needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure' 159 ) 160 161 steps: 162 - name: Dispatch workflow run 163 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 164 with: 165 retries: 2 166 retry-exempt-status-codes: 418 167 script: | 168 github.rest.actions.createWorkflowDispatch({ 169 owner: context.repo.owner, 170 repo: context.repo.repo, 171 workflow_id: 'failed-workflow.yml', 172 ref: 'trunk', 173 inputs: { 174 run_id: '${{ github.run_id }}' 175 } 176 });
Note: See TracChangeset
for help on using the changeset viewer.