Changeset 58300 for branches/6.3/.github/workflows/test-build-processes.yml
- Timestamp:
- 06/03/2024 05:00:05 PM (20 months ago)
- Location:
- branches/6.3
- Files:
-
- 1 edited
- 1 moved
-
. (modified) (1 prop)
-
.github/workflows/test-build-processes.yml (moved) (moved from branches/6.3/.github/workflows/test-npm.yml) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.3
- Property svn:mergeinfo changed
/trunk merged: 57124-57125,57249,57918,58157
- Property svn:mergeinfo changed
-
branches/6.3/.github/workflows/test-build-processes.yml
r58299 r58300 1 name: Test npm1 name: Test Build Processes 2 2 3 3 on: … … 38 38 permissions: {} 39 39 40 env:41 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}42 43 40 jobs: 44 # Verifies that installing npm dependencies and building WordPress works as expected. 45 # 46 # Performs the following steps: 47 # - Checks out the repository. 48 # - Sets up Node.js. 49 # - Logs debug information about the GitHub Action runner. 50 # - Installs npm dependencies. 51 # - Builds WordPress to run from the `build` directory. 52 # - Cleans up after building WordPress to the `build` directory. 53 # - Ensures version-controlled files are not modified or deleted. 54 # - Builds WordPress to run from the `src` directory. 55 # - Cleans up after building WordPress to the `src` directory. 56 # - Ensures version-controlled files are not modified or deleted. 57 test-npm: 58 name: Test npm on ${{ matrix.os }} 59 runs-on: ${{ matrix.os }} 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 60 45 permissions: 61 46 contents: read 62 timeout-minutes: 2063 47 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 64 48 strategy: … … 66 50 matrix: 67 51 os: [ ubuntu-latest, windows-latest ] 52 directory: [ 'src', 'build' ] 53 with: 54 os: ${{ matrix.os }} 55 directory: ${{ matrix.directory }} 56 test-emoji: false 68 57 69 steps: 70 - name: Checkout repository 71 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 72 73 - name: Set up Node.js 74 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 75 with: 76 node-version-file: '.nvmrc' 77 cache: npm 78 79 - name: Log debug information 80 run: | 81 npm --version 82 node --version 83 curl --version 84 git --version 85 svn --version 86 87 - name: Install npm Dependencies 88 run: npm ci 89 90 - name: Build WordPress in /src 91 run: npm run build:dev 92 93 - name: Clean after building in /src 94 run: npm run grunt clean -- --dev 95 96 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 97 run: git diff --exit-code 98 99 - name: Build WordPress 100 run: npm run build 101 102 - name: Clean after building 103 run: npm run grunt clean 104 105 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 106 run: git diff --exit-code 107 108 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 58 # Tests the WordPress Core build process on MacOS. 109 59 # 110 # This is separate from the job above in order to use stricter conditions aboutwhen to run.60 # This is separate from the job above in order to use stricter conditions when determining when to run. 111 61 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 112 62 # … … 114 64 # currently no way to determine the OS being used on a given job. 115 65 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 116 # 117 # Performs the following steps: 118 # - Checks out the repository. 119 # - Sets up Node.js. 120 # - Logs debug information about the GitHub Action runner. 121 # - Installs npm dependencies. 122 # - Builds WordPress to run from the `build` directory. 123 # - Cleans up after building WordPress to the `build` directory. 124 # - Ensures version-controlled files are not modified or deleted. 125 # - Builds WordPress to run from the `src` directory. 126 # - Cleans up after building WordPress to the `src` directory. 127 # - Ensures version-controlled files are not modified or deleted. 128 test-npm-macos: 129 name: Test npm on MacOS 130 runs-on: macos-latest 66 test-core-build-process-macos: 67 name: Core running from ${{ matrix.directory }} 68 uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk 131 69 permissions: 132 70 contents: read 133 timeout-minutes: 30134 71 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 135 steps: 136 - name: Checkout repository 137 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 138 139 - name: Set up Node.js 140 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 141 with: 142 node-version-file: '.nvmrc' 143 cache: npm 144 145 - name: Log debug information 146 run: | 147 npm --version 148 node --version 149 curl --version 150 git --version 151 svn --version 152 153 - name: Install npm Dependencies 154 run: npm ci 155 156 - name: Build WordPress in /src 157 run: npm run build:dev 158 159 - name: Clean after building in /src 160 run: npm run grunt clean -- --dev 161 162 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 163 run: git diff --exit-code 164 165 - name: Build WordPress 166 run: npm run build 167 168 - name: Clean after building 169 run: npm run grunt clean 170 171 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 172 run: git diff --exit-code 72 strategy: 73 fail-fast: false 74 matrix: 75 os: [ macos-13 ] 76 directory: [ 'src', 'build' ] 77 with: 78 os: ${{ matrix.os }} 79 directory: ${{ matrix.directory }} 80 test-emoji: false 173 81 174 82 slack-notifications: … … 178 86 actions: read 179 87 contents: read 180 needs: [ test- npm, test-npm-macos ]88 needs: [ test-core-build-process, test-core-build-process-macos ] 181 89 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 182 90 with: 183 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' }}91 calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} 184 92 secrets: 185 93 SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} … … 193 101 permissions: 194 102 actions: write 195 needs: [ test-npm, test-npm-macos,slack-notifications ]103 needs: [ slack-notifications ] 196 104 if: | 197 105 always() && … … 200 108 github.run_attempt < 2 && 201 109 ( 202 needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure'||203 needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure'110 contains( needs.*.result, 'cancelled' ) || 111 contains( needs.*.result, 'failure' ) 204 112 ) 205 113 206 114 steps: 207 115 - name: Dispatch workflow run 208 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.0116 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 209 117 with: 210 118 retries: 2
Note: See TracChangeset
for help on using the changeset viewer.