Changeset 55517 for branches/5.8/.github/workflows/test-npm.yml
- Timestamp:
- 03/10/2023 04:07:11 PM (3 years ago)
- Location:
- branches/5.8
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
.github/workflows/test-npm.yml (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8
- 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.8/.github/workflows/test-npm.yml
r53597 r55517 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 NodeJS. 43 # - Sets up caching for NPM. 44 # _ Installs NPM dependencies. 45 # - Installs Node.js. 46 # _ Installs npm dependencies. 45 47 # - Builds WordPress to run from the `build` directory. 46 48 # - Cleans up after building WordPress to the `build` directory. … … 50 52 # - Ensures version-controlled files are not modified or deleted. 51 53 test-npm: 52 name: Test NPMon ${{ matrix.os }}54 name: Test npm on ${{ matrix.os }} 53 55 runs-on: ${{ matrix.os }} 54 56 timeout-minutes: 20 … … 61 63 steps: 62 64 - name: Checkout repository 63 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.265 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 64 66 65 67 - name: Log debug information … … 71 73 svn --version 72 74 73 - name: Install Node JS74 uses: actions/setup-node@ eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.075 - name: Install Node.js 76 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 75 77 with: 76 78 node-version-file: '.nvmrc' … … 89 91 run: git diff --exit-code 90 92 91 - name: Build WordPress in /src 92 run: npm run build:dev 93 94 - name: Clean after building in /src 95 run: npm run grunt clean -- --dev 96 97 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 98 run: git diff --exit-code 99 100 # Verifies that installing NPM dependencies and building WordPress works as expected on MacOS. 93 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 101 94 # 102 95 # This is separate from the job above in order to use stricter conditions about when to run. 103 96 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 104 97 # 98 # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is 99 # currently no way to determine the OS being used on a given job. 100 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 101 # 105 102 # Performs the following steps: 106 103 # - Checks out the repository. 107 104 # - Logs debug information about the GitHub Action runner. 108 # - Installs NodeJS. 109 # - Sets up caching for NPM. 110 # _ Installs NPM dependencies. 105 # - Installs Node.js. 106 # _ Installs npm dependencies. 111 107 # - Builds WordPress to run from the `build` directory. 112 108 # - Cleans up after building WordPress to the `build` directory. … … 116 112 # - Ensures version-controlled files are not modified or deleted. 117 113 test-npm-macos: 118 name: Test NPMon MacOS114 name: Test npm on MacOS 119 115 runs-on: macos-latest 120 timeout-minutes: 20116 timeout-minutes: 30 121 117 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 122 118 steps: 123 119 - name: Checkout repository 124 uses: actions/checkout@ 2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2120 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 125 121 126 122 - name: Log debug information … … 132 128 svn --version 133 129 134 - name: Install Node JS135 uses: actions/setup-node@ eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0130 - name: Install Node.js 131 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 136 132 with: 137 133 node-version-file: '.nvmrc' … … 171 167 SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} 172 168 SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} 169 170 failed-workflow: 171 name: Failed workflow tasks 172 runs-on: ubuntu-latest 173 needs: [ test-npm, test-npm-macos, slack-notifications ] 174 if: | 175 always() && 176 github.repository == 'WordPress/wordpress-develop' && 177 github.event_name != 'pull_request' && 178 github.run_attempt < 2 && 179 ( 180 needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure' || 181 needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure' 182 ) 183 184 steps: 185 - name: Dispatch workflow run 186 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 187 with: 188 retries: 2 189 retry-exempt-status-codes: 418 190 script: | 191 github.rest.actions.createWorkflowDispatch({ 192 owner: context.repo.owner, 193 repo: context.repo.repo, 194 workflow_id: 'failed-workflow.yml', 195 ref: 'trunk', 196 inputs: { 197 run_id: '${{ github.run_id }}' 198 } 199 });
Note: See TracChangeset
for help on using the changeset viewer.