Changeset 58276 for branches/6.4/.github/workflows/test-build-processes.yml
- Timestamp:
- 05/31/2024 07:23:44 PM (12 months ago)
- Location:
- branches/6.4
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/6.4
- Property svn:mergeinfo changed
/trunk merged: 57124-57125,57249,57918,58157
- Property svn:mergeinfo changed
-
branches/6.4/.github/workflows/test-build-processes.yml
r58275 r58276 1 name: Test npm1 name: Test Build Processes 2 2 3 3 on: … … 38 38 permissions: {} 39 39 40 env:41 PUPPETEER_SKIP_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 include: 54 # Only prepare artifacts for Playground 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 68 63 69 steps: 70 - name: Checkout repository 71 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 72 with: 73 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} 74 75 - name: Set up Node.js 76 uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 77 with: 78 node-version-file: '.nvmrc' 79 check-latest: true 80 cache: npm 81 82 - name: Log debug information 83 run: | 84 npm --version 85 node --version 86 curl --version 87 git --version 88 svn --version 89 90 - name: Install npm Dependencies 91 run: npm ci 92 93 - name: Build WordPress in /src 94 run: npm run build:dev 95 96 - name: Clean after building in /src 97 run: npm run grunt clean -- --dev 98 99 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 100 run: git diff --exit-code 101 102 - name: Build WordPress 103 run: npm run build 104 105 - name: Clean after building 106 run: npm run grunt clean 107 108 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 109 run: git diff --exit-code 110 111 # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. 64 # Tests the WordPress Core build process on MacOS. 112 65 # 113 # 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. 114 67 # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. 115 68 # … … 117 70 # currently no way to determine the OS being used on a given job. 118 71 # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. 119 # 120 # Performs the following steps: 121 # - Checks out the repository. 122 # - Sets up Node.js. 123 # - Logs debug information about the GitHub Action runner. 124 # - Installs npm dependencies. 125 # - Builds WordPress to run from the `build` directory. 126 # - Cleans up after building WordPress to the `build` directory. 127 # - Ensures version-controlled files are not modified or deleted. 128 # - Builds WordPress to run from the `src` directory. 129 # - Cleans up after building WordPress to the `src` directory. 130 # - Ensures version-controlled files are not modified or deleted. 131 test-npm-macos: 132 name: Test npm on MacOS 133 runs-on: macos-latest 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 134 75 permissions: 135 76 contents: read 136 timeout-minutes: 30137 77 if: ${{ github.repository == 'WordPress/wordpress-develop' }} 138 steps: 139 - name: Checkout repository 140 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 141 with: 142 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} 143 144 - name: Set up Node.js 145 uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 146 with: 147 node-version-file: '.nvmrc' 148 check-latest: true 149 cache: npm 150 151 - name: Log debug information 152 run: | 153 npm --version 154 node --version 155 curl --version 156 git --version 157 svn --version 158 159 - name: Install npm Dependencies 160 run: npm ci 161 162 - name: Build WordPress in /src 163 run: npm run build:dev 164 165 - name: Clean after building in /src 166 run: npm run grunt clean -- --dev 167 168 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 169 run: git diff --exit-code 170 171 - name: Build WordPress 172 run: npm run build 173 174 - name: Clean after building 175 run: npm run grunt clean 176 177 - name: Ensure version-controlled files are not modified or deleted during building and cleaning 178 run: git diff --exit-code 78 strategy: 79 fail-fast: false 80 matrix: 81 os: [ macos-latest ] 82 directory: [ 'src', 'build' ] 83 with: 84 os: ${{ matrix.os }} 85 directory: ${{ matrix.directory }} 86 test-emoji: false 179 87 180 88 slack-notifications: … … 184 92 actions: read 185 93 contents: read 186 needs: [ test- npm, test-npm-macos ]94 needs: [ test-core-build-process, test-core-build-process-macos ] 187 95 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} 188 96 with: … … 212 120 steps: 213 121 - name: Dispatch workflow run 214 uses: actions/github-script@ d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1122 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 215 123 with: 216 124 retries: 2
Note: See TracChangeset
for help on using the changeset viewer.