Changeset 58611 for branches/5.4/.github/workflows/test-build-processes.yml
- Timestamp:
- 07/01/2024 07:17:07 PM (5 months ago)
- Location:
- branches/5.4
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/5.4
- Property svn:mergeinfo changed
/trunk merged: 49264,51673,52179,53552,53895,56464,57124-57125,57249,57918,58157
- Property svn:mergeinfo changed
-
branches/5.4/.github/workflows/test-build-processes.yml
r58610 r58611 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 Node.js. 46 # _ Installs npm dependencies. 47 # - Builds WordPress to run from the `build` directory. 48 # - Cleans up after building WordPress to the `build` directory. 49 # - Builds WordPress to run from the `src` directory. 50 # - Cleans up after building WordPress to the `src` directory. 51 test-npm: 52 name: Test npm on ${{ matrix.os }} 53 runs-on: ${{ matrix.os }} 54 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 55 47 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 56 48 strategy: … … 58 50 matrix: 59 51 os: [ ubuntu-latest, windows-latest ] 52 directory: [ 'src', '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 60 63 61 steps: 62 - name: Checkout repository 63 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 64 65 - name: Log debug information 66 run: | 67 npm --version 68 node --version 69 curl --version 70 git --version 71 svn --version 72 73 - name: Install Node.js 74 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 75 with: 76 node-version-file: '.nvmrc' 77 cache: npm 78 79 - name: Install Dependencies 80 run: npm ci 81 82 - name: Build WordPress 83 run: npm run build 84 85 - name: Clean after building 86 run: npm run grunt clean 87 88 - name: Build WordPress in /src 89 run: npm run build:dev 90 91 - name: Clean after building in /src 92 run: npm run grunt clean -- --dev 93 94 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 64 # Tests the WordPress Core build process on MacOS. 95 65 # 96 # 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. 97 67 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 98 68 # … … 100 70 # currently no way to determine the OS being used on a given job. 101 71 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 102 # 103 # Performs the following steps: 104 # - Checks out the repository. 105 # - Logs debug information about the GitHub Action runner. 106 # - Installs Node.js. 107 # _ Installs npm dependencies. 108 # - Builds WordPress to run from the `build` directory. 109 # - Cleans up after building WordPress to the `build` directory. 110 # - Builds WordPress to run from the `src` directory. 111 # - Cleans up after building WordPress to the `src` directory. 112 test-npm-macos: 113 name: Test npm on MacOS 114 runs-on: macos-latest 115 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 116 77 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 117 steps: 118 - name: Checkout repository 119 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 120 121 - name: Log debug information 122 run: | 123 npm --version 124 node --version 125 curl --version 126 git --version 127 svn --version 128 129 - name: Install Node.js 130 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 131 with: 132 node-version-file: '.nvmrc' 133 cache: npm 134 135 - name: Install Dependencies 136 run: npm ci 137 138 - name: Build WordPress 139 run: npm run build 140 141 - name: Clean after building 142 run: npm run grunt clean 143 144 - name: Build WordPress in /src 145 run: npm run build:dev 146 147 - name: Clean after building in /src 148 run: npm run grunt clean -- --dev 78 strategy: 79 fail-fast: false 80 matrix: 81 os: [ macos-13 ] 82 directory: [ 'src', 'build' ] 83 with: 84 os: ${{ matrix.os }} 85 directory: ${{ matrix.directory }} 86 test-emoji: false 149 87 150 88 slack-notifications: 151 89 name: Slack Notifications 152 90 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 153 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 ] 154 95 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 155 96 with: 156 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' }} 157 98 secrets: 158 99 SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} … … 164 105 name: Failed workflow tasks 165 106 runs-on: ubuntu-latest 166 needs: [ test-npm, test-npm-macos, slack-notifications ] 107 permissions: 108 actions: write 109 needs: [ slack-notifications ] 167 110 if: | 168 111 always() && … … 171 114 github.run_attempt < 2 && 172 115 ( 173 needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure'||174 needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure'116 contains( needs.*.result, 'cancelled' ) || 117 contains( needs.*.result, 'failure' ) 175 118 ) 176 119 177 120 steps: 178 121 - name: Dispatch workflow run 179 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.0122 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 180 123 with: 181 124 retries: 2
Note: See TracChangeset
for help on using the changeset viewer.