Changeset 58643 for branches/4.2/.github/workflows/test-build-processes.yml
- Timestamp:
- 07/03/2024 03:33:59 PM (5 months ago)
- Location:
- branches/4.2
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2
- Property svn:mergeinfo changed
/trunk merged: 51673,53552,56464,57124-57125,57249,57918,58157
- Property svn:mergeinfo changed
-
branches/4.2/.github/workflows/test-build-processes.yml
r58642 r58643 1 name: Test npm1 name: Test Build Processes 2 2 3 3 on: … … 34 34 cancel-in-progress: true 35 35 36 env: 37 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} 36 # Disable permissions for all available scopes by default. 37 # Any needed permissions should be configured at the job level. 38 permissions: {} 38 39 39 40 jobs: 40 # Verifies that installing npm dependencies and building WordPress works as expected. 41 # 42 # Performs the following steps: 43 # - Checks out the repository. 44 # - Logs debug information about the GitHub Action runner. 45 # - Installs NodeJS. 46 # _ Installs npm dependencies. 47 # - Builds WordPress to run from the `build` directory. 48 # - Cleans up after building WordPress to the `build` directory. 49 test-npm: 50 name: Test npm on ${{ matrix.os }} 51 runs-on: ${{ matrix.os }} 52 timeout-minutes: 20 41 # Tests the WordPress Core build process on multiple operating systems. 42 test-core-build-process: 43 name: Core running from ${{ matrix.directory }} 44 uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk 45 permissions: 46 contents: read 53 47 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 54 48 strategy: … … 56 50 matrix: 57 51 os: [ ubuntu-latest, windows-latest ] 52 directory: [ 'build' ] 53 include: 54 # Only prepare artifacts once. 55 - os: ubuntu-latest 56 directory: 'build' 57 prepare-playground: true 58 with: 59 os: ${{ matrix.os }} 60 directory: ${{ matrix.directory }} 61 prepare-playground: ${{ matrix.prepare-playground && matrix.prepare-playground || false }} 62 test-emoji: false 58 63 59 steps: 60 - name: Checkout repository 61 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 62 63 - name: Log debug information 64 run: | 65 npm --version 66 node --version 67 curl --version 68 git --version 69 svn --version 70 71 - name: Set up Node.js 72 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 73 with: 74 node-version-file: '.nvmrc' 75 cache: npm 76 77 - name: Install Dependencies 78 run: npm ci 79 80 - name: Build WordPress 81 run: npm run build 82 83 - name: Clean after building 84 run: npm run grunt clean 85 86 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 64 # Tests the WordPress Core build process on MacOS. 87 65 # 88 # This is separate from the job above in order to use stricter conditions aboutwhen to run.66 # This is separate from the job above in order to use stricter conditions when determining when to run. 89 67 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 90 68 # … … 92 70 # currently no way to determine the OS being used on a given job. 93 71 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 94 # 95 # Performs the following steps: 96 # - Checks out the repository. 97 # - Logs debug information about the GitHub Action runner. 98 # - Installs NodeJS. 99 # _ Installs npm dependencies. 100 # - Builds WordPress to run from the `build` directory. 101 # - Cleans up after building WordPress to the `build` directory. 102 test-npm-macos: 103 name: Test npm on MacOS 104 runs-on: macos-latest 105 timeout-minutes: 30 72 test-core-build-process-macos: 73 name: Core running from ${{ matrix.directory }} 74 uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk 75 permissions: 76 contents: read 106 77 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 107 steps: 108 - name: Checkout repository 109 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 110 111 - name: Log debug information 112 run: | 113 npm --version 114 node --version 115 curl --version 116 git --version 117 svn --version 118 119 - name: Set up Node.js 120 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 121 with: 122 node-version-file: '.nvmrc' 123 cache: npm 124 125 - name: Install Dependencies 126 run: npm ci 127 128 - name: Build WordPress 129 run: npm run build 130 131 - name: Clean after building 132 run: npm run grunt clean 78 strategy: 79 fail-fast: false 80 matrix: 81 os: [ macos-13 ] 82 directory: [ 'build' ] 83 with: 84 os: ${{ matrix.os }} 85 directory: ${{ matrix.directory }} 86 test-emoji: false 133 87 134 88 slack-notifications: 135 89 name: Slack Notifications 136 90 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 137 needs: [ test-npm, test-npm-macos ] 91 permissions: 92 actions: read 93 contents: read 94 needs: [ test-core-build-process, test-core-build-process-macos ] 138 95 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 139 96 with: 140 calling_status: ${{ needs.test-npm.result == 'success' && needs.test-npm-macos.result == 'success' && 'success' || ( needs.test-npm.result == 'cancelled' || needs.test-npm-macos.result == 'cancelled' ) && 'cancelled' || 'failure' }}97 calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} 141 98 secrets: 142 99 SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} … … 148 105 name: Failed workflow tasks 149 106 runs-on: ubuntu-latest 150 needs: [ test-npm, test-npm-macos, slack-notifications ] 107 permissions: 108 actions: write 109 needs: [ slack-notifications ] 151 110 if: | 152 111 always() && … … 155 114 github.run_attempt < 2 && 156 115 ( 157 needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure'||158 needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure'116 contains( needs.*.result, 'cancelled' ) || 117 contains( needs.*.result, 'failure' ) 159 118 ) 160 119 161 120 steps: 162 121 - name: Dispatch workflow run 163 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.0122 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 164 123 with: 165 124 retries: 2
Note: See TracChangeset
for help on using the changeset viewer.