Changeset 50646 for branches/3.8/.github/workflows/phpunit-tests.yml
- Timestamp:
- 04/02/2021 04:05:53 PM (4 years ago)
- Location:
- branches/3.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8
- Property svn:mergeinfo changed
/trunk merged: 50379,50387,50416,50432,50435-50436,50444,50446,50473-50474,50476,50479,50485-50487,50545,50590
- Property svn:mergeinfo changed
-
branches/3.8/.github/workflows/phpunit-tests.yml
r50323 r50646 5 5 branches: 6 6 - master 7 - trunk 7 8 - '3.[7-9]' 8 9 - '[4-9].[0-9]' … … 11 12 - '[4-9].[0-9]*' 12 13 pull_request: 14 branches: 15 - master 16 - trunk 17 - '3.[7-9]' 18 - '[4-9].[0-9]' 19 workflow_dispatch: 13 20 # Once weekly On Sundays at 00:00 UTC. 14 21 schedule: … … 44 51 - name: Cancel previous runs of this workflow (pull requests only) 45 52 if: ${{ github.event_name == 'pull_request' }} 46 uses: styfle/cancel-workflow-action@0.5.0 47 with: 48 access_token: ${{ github.token }} 53 uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0 49 54 50 55 - name: Checkout repository 51 uses: actions/checkout@ v256 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 52 57 53 58 - name: Log debug information … … 65 70 66 71 - name: Install NodeJS 67 uses: actions/setup-node@ v172 uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 68 73 with: 69 74 node-version: 14 70 75 71 76 - name: Cache NodeJS modules 72 uses: actions/cache@ v277 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 73 78 env: 74 79 cache-name: cache-node-modules … … 77 82 path: ~/.npm 78 83 key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} 79 restore-keys: |80 ${{ runner.os }}-npm-81 84 82 85 - name: Install Dependencies 83 run: np x install-changed --install-command="npm ci"86 run: npm ci 84 87 85 88 - name: Build WordPress … … 87 90 88 91 - name: Create ZIP artifact 89 uses: thedoctor0/zip-release@ 0.4.192 uses: thedoctor0/zip-release@a1afcab9c664c9976ac398fa831eac67bed1eb0e # v0.4.1 90 93 with: 91 94 filename: built-wp-${{ github.sha }}.zip … … 93 96 94 97 - name: Upload build artifact 95 uses: actions/upload-artifact@ v298 uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571 # v2.2.2 96 99 with: 97 100 name: built-wp-${{ github.sha }} … … 125 128 # - todo: Configure Slack notifications for failing tests. 126 129 test-php: 127 name: ${{ matrix.php }}${{ matrix.m emcached && ' with memcached' || '' }} on ${{ matrix.os }}130 name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }} ${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} 128 131 needs: setup-wordpress 129 132 runs-on: ${{ matrix.os }} 130 133 strategy: 134 fail-fast: false 131 135 matrix: 132 php: [ '5. 5', '5.4', '5.3' ]136 php: [ '5.3', '5.4', '5.5' ] 133 137 os: [ ubuntu-latest ] 138 split_slow: [ false, true ] 139 multisite: [ false, true ] 134 140 env: 135 141 LOCAL_PHP: ${{ matrix.php }}-fpm 136 142 LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }} 143 PHPUNIT_CONFIG: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} 144 SLOW_TESTS: 'external-http,media' 137 145 138 146 steps: … … 143 151 144 152 - name: Download the built WordPress artifact 145 uses: actions/download-artifact@ v2153 uses: actions/download-artifact@4a7a711286f30c025902c28b541c10e147a9b843 # v2.0.8 146 154 with: 147 155 name: built-wp-${{ github.sha }} … … 151 159 152 160 - name: Install NodeJS 153 uses: actions/setup-node@ v1161 uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 154 162 with: 155 163 node-version: 14 156 164 157 165 - name: Use cached Node modules 158 uses: actions/cache@ v2166 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 159 167 env: 160 168 cache-name: cache-node-modules … … 163 171 path: ~/.npm 164 172 key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} 165 restore-keys: |166 ${{ runner.os }}-npm-167 173 168 174 - name: Install Dependencies 169 run: np x install-changed --install-command="npm ci"175 run: npm ci 170 176 171 177 - name: Cache Composer dependencies 172 178 if: ${{ env.COMPOSER_INSTALL == true }} 173 uses: actions/cache@ v2179 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 174 180 env: 175 181 cache-name: cache-composer-dependencies … … 177 183 path: ${{ steps.composer-cache.outputs.dir }} 178 184 key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} 179 restore-keys: |180 ${{ runner.os }}-php-${{ matrix.php }}-composer-181 185 182 186 - name: Install Composer dependencies … … 224 228 run: npm run env:install 225 229 230 - name: Run slow PHPUnit tests 231 if: ${{ matrix.split_slow }} 232 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ${{ env.SLOW_TESTS }} 233 234 - name: Run PHPUnit tests for single site excluding slow tests 235 if: ${{ matrix.php < '7.0' && ! matrix.split_slow && ! matrix.multisite }} 236 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-required 237 238 - name: Run PHPUnit tests for Multisite excluding slow tests 239 if: ${{ matrix.php < '7.0' && ! matrix.split_slow && matrix.multisite }} 240 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-excluded,oembed-headers 241 226 242 - name: Run PHPUnit tests 227 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist 243 if: ${{ matrix.php >= '7.0' }} 244 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} 228 245 229 246 - name: Run AJAX tests 230 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group ajax 231 232 - name: Run tests as a multisite install 233 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml 247 if: ${{ ! matrix.multisite && ! matrix.split_slow }} 248 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax 234 249 235 250 - name: Run external HTTP tests 251 if: ${{ ! matrix.multisite && ! matrix.split_slow }} 236 252 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group external-http 237 253 238 254 - name: Checkout the WordPress Test Reporter 239 255 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }} 240 uses: actions/checkout@ v2256 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 241 257 with: 242 258 repository: 'WordPress/phpunit-test-runner'
Note: See TracChangeset
for help on using the changeset viewer.