Changeset 55516 for branches/5.9/.github/workflows/test-npm.yml
- Timestamp:
- 03/10/2023 03:52:41 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.9/.github/workflows/test-npm.yml
r53596 r55516 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. … … 49 52 # - Ensures version-controlled files are not modified or deleted. 50 53 test-npm: 51 name: Test NPMon ${{ matrix.os }}54 name: Test npm on ${{ matrix.os }} 52 55 runs-on: ${{ matrix.os }} 53 56 timeout-minutes: 20 … … 60 63 steps: 61 64 - name: Checkout repository 62 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.265 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 63 66 64 67 - name: Log debug information … … 70 73 svn --version 71 74 72 - name: Install Node JS73 uses: actions/setup-node@ eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.075 - name: Install Node.js 76 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 74 77 with: 75 78 node-version-file: '.nvmrc' … … 97 100 run: git diff --exit-code 98 101 99 # Verifies that installing NPMdependencies and building WordPress works as expected on MacOS.102 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 100 103 # 101 104 # This is separate from the job above in order to use stricter conditions about when to run. 102 105 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 106 # 107 # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is 108 # currently no way to determine the OS being used on a given job. 109 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 103 110 # 104 111 # Performs the following steps: 105 112 # - Checks out the repository. 106 113 # - Logs debug information about the GitHub Action runner. 107 # - Installs Node JS.108 # _ Installs NPMdependencies.114 # - Installs Node.js. 115 # _ Installs npm dependencies. 109 116 # - Builds WordPress to run from the `build` directory. 110 117 # - Cleans up after building WordPress to the `build` directory. … … 114 121 # - Ensures version-controlled files are not modified or deleted. 115 122 test-npm-macos: 116 name: Test NPMon MacOS123 name: Test npm on MacOS 117 124 runs-on: macos-latest 118 timeout-minutes: 20125 timeout-minutes: 30 119 126 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 120 127 steps: 121 128 - name: Checkout repository 122 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2129 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 123 130 124 131 - name: Log debug information … … 130 137 svn --version 131 138 132 - name: Install Node JS133 uses: actions/setup-node@ eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0139 - name: Install Node.js 140 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 134 141 with: 135 142 node-version-file: '.nvmrc' … … 169 176 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 170 177 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 178 179 failed-workflow: 180 name: Failed workflow tasks 181 runs-on: ubuntu-latest 182 needs: [ test-npm, test-npm-macos, slack-notifications ] 183 if: | 184 always() && 185 github.repository == 'WordPress/wordpress-develop' && 186 github.event_name != 'pull_request' && 187 github.run_attempt < 2 && 188 ( 189 needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure' || 190 needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure' 191 ) 192 193 steps: 194 - name: Dispatch workflow run 195 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 196 with: 197 retries: 2 198 retry-exempt-status-codes: 418 199 script: | 200 github.rest.actions.createWorkflowDispatch({ 201 owner: context.repo.owner, 202 repo: context.repo.repo, 203 workflow_id: 'failed-workflow.yml', 204 ref: 'trunk', 205 inputs: { 206 run_id: '${{ github.run_id }}' 207 } 208 });
Note: See TracChangeset
for help on using the changeset viewer.