WordPress.org

Make WordPress Core

Ticket #50401: 50401.2.diff

File 50401.2.diff, 28.2 KB (added by desrosj, 12 months ago)
  • new file .github/workflows/coding-standards.yml

    diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml
    new file mode 100644
    index 0000000000..4623b99fd7
    - +  
     1name: Coding Standards
     2
     3on:
     4  push:
     5    branches:
     6      - master
     7      # PHPCS checking was introduced in WordPress 5.1.
     8      - '5.[1-9]'
     9      - '[6-9].*'
     10  pull_request:
     11
     12jobs:
     13  # Runs PHP coding standards checks.
     14  #
     15  # Violations are reported inline with annotations.
     16  #
     17  # Performs the following steps:
     18  # - Checks out the repository.
     19  # - Configures caching for Composer.
     20  # - Sets up PHP.
     21  # - Logs debug information.
     22  # - Installs Composer dependencies (from cache if possible).
     23  # - Logs PHP_CodeSniffer debug information.
     24  # - Runs PHPCS on the full codebase with warnings suppressed.
     25  # - Runs PHPCS on the `tests` directory without warnings suppressed.
     26  # - todo: Configure Slack notifications for failing scans.
     27  phpcs:
     28    name: PHP coding standards
     29    runs-on: ubuntu-latest
     30    steps:
     31      - name: Checkout repository
     32        uses: actions/checkout@v2
     33
     34      - name: Get Composer cache directory
     35        id: composer-cache
     36        run: echo "::set-output name=dir::$(composer config cache-files-dir)"
     37
     38      - name: Set up Composer caching
     39        uses: actions/cache@v2
     40        env:
     41          cache-name: cache-composer-dependencies
     42        with:
     43          path: ${{ steps.composer-cache.outputs.dir }}
     44          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
     45          restore-keys: |
     46            ${{ runner.os }}-composer-
     47
     48      - name: Set up PHP
     49        uses: shivammathur/setup-php@v2
     50        with:
     51          php-version: '7.4'
     52          coverage: none
     53          tools: composer, cs2pr
     54
     55      - name: Log debug information
     56        run: |
     57          php --version
     58          composer --version
     59
     60      - name: Install Composer dependencies
     61        run: |
     62          composer install --prefer-dist --no-suggest --no-progress --no-ansi --no-interaction
     63          echo "vendor/bin" >> $GITHUB_PATH
     64
     65      - name: Log PHPCS debug information
     66        run: phpcs -i
     67
     68      - name: Run PHPCS on all Core files
     69        run: vendor/bin/phpcs -q -n --report=checkstyle | cs2pr
     70
     71      - name: Check test suite files for warnings
     72        run: vendor/bin/phpcs tests -q --report=checkstyle | cs2pr
     73
     74  # Runs the JavaScript coding standards checks.
     75  #
     76  # Performs the following steps:
     77  # - Checks out the repository.
     78  # - Logs debug information about the runner container.
     79  # - Installs NodeJS 12 (todo: install the version of NPM specified in the `.nvmrc` file to support older branches)
     80  # - Sets up caching for NPM.
     81  # - Logs updated debug information.
     82  # _ Installs NPM dependencies.
     83  # - Run the WordPress JSHint checks.
     84  # - todo: Configure Slack notifications for failing tests.
     85  jshint:
     86    name: JavaScript coding standards
     87    runs-on: ubuntu-latest
     88    steps:
     89      - name: Checkout repository
     90        uses: actions/checkout@v2
     91
     92      - name: Log debug information
     93        run: |
     94          npm --version
     95          node --version
     96          git --version
     97          svn --version
     98
     99      - name: Install NodeJS
     100        uses: actions/setup-node@v1
     101        with:
     102          node-version: 12
     103
     104      - name: Cache NodeJS modules
     105        uses: actions/cache@v2
     106        env:
     107          cache-name: cache-node-modules
     108        with:
     109          # npm cache files are stored in `~/.npm` on Linux/macOS
     110          path: ~/.npm
     111          key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     112          restore-keys: |
     113            ${{ runner.os }}-npm-
     114
     115      - name: Log debug information
     116        run: |
     117          npm --version
     118          node --version
     119
     120      - name: Install Dependencies
     121        run: npm ci
     122
     123      - name: Run JSHint
     124        run: npm run grunt jshint
  • new file .github/workflows/end-to-end-tests.yml

    diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml
    new file mode 100644
    index 0000000000..a9bbe81638
    - +  
     1name: End-to-end Tests
     2
     3on:
     4  push:
     5    branches:
     6      - master
     7      # The end to end test suite was introduced in WordPress 5.3.
     8      - '5.[3-9]'
     9      - '[6-9].*'
     10  pull_request:
     11
     12env:
     13  LOCAL_DIR: build
     14
     15jobs:
     16  # Runs the end-to-end test suite.
     17  #
     18  # Performs the following steps:
     19  # - Cancels all previous workflow runs that have not completed.
     20  # - Set environment variables.
     21  # - Checks out the repository.
     22  # - Logs debug information about the runner container.
     23  # - Installs NodeJS 12 (todo: install the version of NPM specified in the `.nvmrc` file to support older branches)
     24  # - Sets up caching for NPM.
     25  # _ Installs NPM dependencies.
     26  # - Builds WordPress to run from the `build` directory.
     27  # - Starts the WordPress Docker container.
     28  # - Logs general debug information.
     29  # - Logs the running Docker containers.
     30  # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container)
     31  # - Install WordPress within the Docker container.
     32  # - Run the E2E tests.
     33  # - todo: Configure Slack notifications for failing tests.
     34  e2e-tests:
     35    name: E2E Tests
     36    runs-on: ubuntu-latest
     37    steps:
     38      - name: Cancel previous runs of this workflow
     39        uses: styfle/cancel-workflow-action@0.5.0
     40        with:
     41          access_token: ${{ github.token }}
     42
     43      - name: Configure environment variables
     44        run: |
     45          echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
     46          echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
     47
     48      - name: Checkout repository
     49        uses: actions/checkout@v2
     50
     51      - name: Log debug information
     52        run: |
     53          npm --version
     54          node --version
     55          curl --version
     56          git --version
     57          svn --version
     58          php --version
     59          php -i
     60          locale -a
     61
     62      - name: Install NodeJS
     63        uses: actions/setup-node@v1
     64        with:
     65          node-version: 12
     66
     67      - name: Cache NodeJS modules
     68        uses: actions/cache@v2
     69        env:
     70          cache-name: cache-node-modules
     71        with:
     72          # npm cache files are stored in `~/.npm` on Linux/macOS
     73          path: ~/.npm
     74          key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     75          restore-keys: |
     76            ${{ runner.os }}-npm-
     77
     78      - name: Install Dependencies
     79        run: npm ci
     80
     81      - name: Build WordPress
     82        run: npm run build
     83
     84      - name: Start Docker environment
     85        run: |
     86          npm run env:start
     87
     88      - name: General debug information
     89        run: |
     90          npm --version
     91          node --version
     92          curl --version
     93          git --version
     94          svn --version
     95
     96      - name: Log running Docker containers
     97        run: docker ps -a
     98
     99      - name: Docker debug information
     100        run: |
     101          docker -v
     102          docker-compose -v
     103          docker-compose run --rm mysql mysql --version
     104          docker-compose run --rm php php --version
     105          docker-compose run --rm php php -m
     106          docker-compose run --rm php php -i
     107          docker-compose run --rm php locale -a
     108
     109      - name: Install WordPress
     110        run: npm run env:install
     111
     112      - name: Run E2E tests
     113        run: npm run test:e2e
  • new file .github/workflows/javascript-tests.yml

    diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml
    new file mode 100644
    index 0000000000..0dbbb65599
    - +  
     1name: JavaScript Tests
     2
     3on:
     4  push:
     5    branches:
     6      - master
     7      - '*.*'
     8  pull_request:
     9
     10jobs:
     11  # Runs the QUnit tests for WordPress.
     12  #
     13  # Performs the following steps:
     14  # - Cancels all previous workflow runs that have not completed.
     15  # - Checks out the repository.
     16  # - Logs debug information about the runner container.
     17  # - Installs NodeJS 12 (todo: install the version of NPM specified in the `.nvmrc` file to support older branches)
     18  # - Sets up caching for NPM.
     19  # - Logs updated debug information.
     20  # _ Installs NPM dependencies.
     21  # - Run the WordPress QUnit tests.
     22  # - todo: Configure Slack notifications for failing tests.
     23  test-js:
     24    name: QUnit Tests
     25    runs-on: ubuntu-latest
     26    steps:
     27      - name: Cancel previous runs of this workflow
     28        uses: styfle/cancel-workflow-action@0.5.0
     29        with:
     30          access_token: ${{ github.token }}
     31
     32      - name: Checkout repository
     33        uses: actions/checkout@v2
     34
     35      - name: Log debug information
     36        run: |
     37          npm --version
     38          node --version
     39          git --version
     40          svn --version
     41
     42      - name: Install NodeJS
     43        uses: actions/setup-node@v1
     44        with:
     45          node-version: 12
     46
     47      - name: Cache NodeJS modules
     48        uses: actions/cache@v2
     49        env:
     50          cache-name: cache-node-modules
     51        with:
     52          # npm cache files are stored in `~/.npm` on Linux/macOS
     53          path: ~/.npm
     54          key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     55          restore-keys: |
     56            ${{ runner.os }}-npm-
     57
     58      - name: Log debug information
     59        run: |
     60          npm --version
     61          node --version
     62
     63      - name: Install Dependencies
     64        run: npm ci
     65
     66      - name: Run QUnit tests
     67        run: npm run grunt qunit:compiled
  • new file .github/workflows/php-compatibility.yml

    diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml
    new file mode 100644
    index 0000000000..99d143c3f8
    - +  
     1name: PHP Compatibility
     2
     3on:
     4  push:
     5    branches:
     6      - master
     7      # The PHP compatibility testing was introduced in WordPress 5.5.
     8      - '5.[5-9]'
     9      - '[6-9].*'
     10  pull_request:
     11
     12jobs:
     13
     14  # Runs PHP compatibility testing.
     15  #
     16  # Violations are reported inline with annotations.
     17  #
     18  # Performs the following steps:
     19  # - Checks out the repository.
     20  # - Configures caching for Composer.
     21  # - Sets up PHP.
     22  # - Logs debug information about the runner container.
     23  # - Installs Composer dependencies (from cache if possible).
     24  # - Logs PHP_CodeSniffer debug information.
     25  # - Runs the PHP compatibility tests.
     26  # - todo: Configure Slack notifications for failing scans.
     27  php-comatibility:
     28    name: Check PHP compatibility
     29    runs-on: ubuntu-latest
     30
     31    steps:
     32      - name: Checkout repository
     33        uses: actions/checkout@v2
     34
     35      - name: Get Composer cache directory
     36        id: composer-cache
     37        run: echo "::set-output name=dir::$(composer config cache-files-dir)"
     38
     39      - name: Set up Composer caching
     40        uses: actions/cache@v2
     41        env:
     42          cache-name: cache-composer-dependencies
     43        with:
     44          path: ${{ steps.composer-cache.outputs.dir }}
     45          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
     46          restore-keys: |
     47            ${{ runner.os }}-composer-
     48
     49      - name: Set up PHP
     50        uses: shivammathur/setup-php@v2
     51        with:
     52          php-version: '7.4'
     53          coverage: none
     54          tools: composer, cs2pr
     55
     56      - name: Log debug information
     57        run: |
     58          php --version
     59          composer --version
     60
     61      - name: Install Composer dependencies
     62        run: |
     63          composer install --prefer-dist --no-suggest --no-progress --no-ansi --no-interaction
     64          echo "vendor/bin" >> $GITHUB_PATH
     65
     66      - name: Run PHP compatibility tests
     67        run: vendor/bin/phpcs --standard=phpcompat.xml.dist -q --report=checkstyle | cs2pr
  • new file .github/workflows/phpunit-tests.yml

    diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml
    new file mode 100644
    index 0000000000..fd89460ddf
    - +  
     1name: PHPUnit Tests
     2
     3on:
     4  push:
     5    branches:
     6      - master
     7      - '*.*'
     8  pull_request:
     9  # Once weekly On Sundays at 00:00 UTC.
     10  schedule:
     11    - cron: '0 0 * * 0'
     12
     13env:
     14  LOCAL_DIR: build
     15  PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
     16  COMPOSER_INSTALL: ${{ false }}
     17  # Controls which NPM script to use for running PHPUnit tests. Options ar `php` and `php-composer`.
     18  PHPUNIT_SCRIPT: php
     19  LOCAL_PHP_MEMCACHED: ${{ false }}
     20
     21jobs:
     22  # Sets up WordPress for testing or development use.
     23  #
     24  # Performs the following steps:
     25  # - Cancels all previous workflow runs that have not completed.
     26  # - Checks out the repository.
     27  # - Checks out the WordPress Importer plugin (needed for the Core PHPUnit tests).
     28  # - Logs debug information about the runner container.
     29  # - Installs NodeJS 12 (todo: install the version of NPM specified in the `.nvmrc` file to support older branches)
     30  # - Sets up caching for NPM.
     31  # _ Installs NPM dependencies.
     32  # - Builds WordPress to run from the `build` directory.
     33  # - Creates a ZIP file of compiled WordPress
     34  # - Uploads ZIP file as an artifact.
     35  setup-wordpress:
     36    name: Setup WordPress
     37    runs-on: ubuntu-latest
     38
     39    steps:
     40      - name: Cancel previous runs of this workflow
     41        uses: styfle/cancel-workflow-action@0.5.0
     42        with:
     43          access_token: ${{ github.token }}
     44
     45      - name: Checkout repository
     46        uses: actions/checkout@v2
     47
     48      - name: Checkout the WordPress Importer plugin
     49        run: svn checkout -r 2387243 https://plugins.svn.wordpress.org/wordpress-importer/trunk/ tests/phpunit/data/plugins/wordpress-importer
     50
     51      - name: Log debug information
     52        run: |
     53          npm --version
     54          node --version
     55          curl --version
     56          git --version
     57          svn --version
     58          php --version
     59          php -i
     60          locale -a
     61
     62      - name: Install NodeJS
     63        uses: actions/setup-node@v1
     64        with:
     65          node-version: 12
     66
     67      - name: Cache NodeJS modules
     68        uses: actions/cache@v2
     69        env:
     70          cache-name: cache-node-modules
     71        with:
     72          # npm cache files are stored in `~/.npm` on Linux/macOS
     73          path: ~/.npm
     74          key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     75          restore-keys: |
     76            ${{ runner.os }}-npm-
     77
     78      - name: Install Dependencies
     79        run: npm ci
     80
     81      - name: Build WordPress
     82        run: npm run build
     83
     84      - name: Create ZIP artifact
     85        uses: thedoctor0/zip-release@0.4.1
     86        with:
     87          filename: built-wp-${{ github.sha }}.zip
     88          exclusions: '/*node_modules/*'
     89
     90      - name: Upload build artifact
     91        uses: actions/upload-artifact@v2
     92        with:
     93          name: built-wp-${{ github.sha }}
     94          path: built-wp-${{ github.sha }}.zip
     95          if-no-files-found: error
     96
     97  # Runs the PHPUnit tests for WordPress.
     98  #
     99  # Performs the following steps:
     100  # - Set environment variables.
     101  # - Sets up the environment variables needed for testing with memcached (if desired).
     102  # - Downloads the built WordPress artifact from the previous job.
     103  # - Unzips the artifact.
     104  # - Installs NodeJS 12 (todo: install the version of NPM specified in the `nvmrc` file to support older branches)
     105  # - Sets up caching for NPM.
     106  # _ Installs NPM dependencies.
     107  # - Configures caching for Composer.
     108  # _ Installs Composer dependencies (if desired)
     109  # - Logs Docker debug information (about both the Docker installation within the runner)
     110  # - Starts the WordPress Docker container.
     111  # - Starts the memcached server after the Docker network has been created (if desired).
     112  # - Logs WordPress Docker container debug information.
     113  # - Logs debug general information.
     114  # - Logs the running Docker containers.
     115  # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container)
     116  # - Install WordPress within the Docker container.
     117  # - Run the PHPUnit tests.
     118  # - Reports test results to the Distributed Hosting Tests.
     119  # - todo: Configure Slack notifications for failing tests.
     120  test-php:
     121    name: ${{ matrix.php_versions }} on ${{ matrix.os }}
     122    needs: setup-wordpress
     123    runs-on: ${{ matrix.os }}
     124    strategy:
     125      matrix:
     126        php_versions: [ '8.0', 7.4, '7.4 with memcached', 7.3, 7.2, 7.1, '7.0', 5.6.20 ]
     127        os: [ ubuntu-latest ]
     128    env:
     129      LOCAL_PHP: ${{ matrix.php_versions }}-fpm
     130
     131    steps:
     132      - name: Configure environment variables
     133        run: |
     134          echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
     135          echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
     136
     137      - name: Configure memcached
     138        if: ${{ contains( matrix.php_versions, 'memcached' ) }}
     139        run: |
     140          echo "LOCAL_PHP=$(echo ${{ matrix.php_versions }} | cut -c1-3)-fpm" >> $GITHUB_ENV
     141          echo "LOCAL_PHP_MEMCACHED=true" >> $GITHUB_ENV
     142
     143      - name: Download the built WordPress artifact
     144        uses: actions/download-artifact@v2
     145        with:
     146          name: built-wp-${{ github.sha }}
     147
     148      - name: Unzip built artifact
     149        run: unzip built-wp-${{ github.sha }}.zip
     150
     151      - name: Install NodeJS
     152        uses: actions/setup-node@v1
     153        with:
     154          node-version: 12
     155
     156      - name: Use cached Node modules
     157        uses: actions/cache@v2
     158        env:
     159          cache-name: cache-node-modules
     160        with:
     161          # npm cache files are stored in `~/.npm` on Linux/macOS
     162          path: ~/.npm
     163          key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     164          restore-keys: |
     165            ${{ runner.os }}-npm-
     166
     167      - name: Install Dependencies
     168        run: npm ci
     169
     170      - name: Get composer cache directory
     171        id: composer-cache
     172        if: ${{ env.COMPOSER_INSTALL == true || env.LOCAL_PHP == '8.0-fpm' }}
     173        run: echo "::set-output name=dir::$(composer config cache-files-dir)"
     174
     175      - name: Cache Composer dependencies
     176        if: ${{ env.COMPOSER_INSTALL == true || env.LOCAL_PHP == '8.0-fpm' }}
     177        uses: actions/cache@v2
     178        env:
     179          cache-name: cache-composer-dependencies
     180        with:
     181          path: ${{ steps.composer-cache.outputs.dir }}
     182          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
     183          restore-keys: |
     184            ${{ runner.os }}-composer-
     185
     186      - name: Install Composer dependencies
     187        if: ${{ env.COMPOSER_INSTALL == true || env.LOCAL_PHP == '8.0-fpm' }}
     188        run: |
     189          docker-compose run --rm php composer --version
     190
     191          # The PHPUnit 7.x phar is not compatible with PHP 8 and won't be updated,
     192          # as PHPUnit 7 is no longer supported. The Composer-installed PHPUnit should be
     193          # used for PHP 8 testing instead.
     194          if [ ${{ env.LOCAL_PHP }} == '8.0-fpm' ]; then
     195            docker-compose run --rm php composer install --ignore-platform-reqs
     196            echo "PHPUNIT_SCRIPT=php-composer" >> $GITHUB_ENV
     197          else
     198            docker-compose run --rm php composer install
     199          fi
     200
     201      - name: Docker debug information
     202        run: |
     203          docker -v
     204          docker-compose -v
     205
     206      - name: Start Docker environment
     207        run: |
     208          npm run env:start
     209
     210      # The memcached server needs to start after the Docker network has been set up with `npm run env:start`.
     211      - name: Start the Memcached server.
     212        if: ${{ contains( matrix.php_versions, 'memcached' ) }}
     213        run: |
     214          cp tests/phpunit/includes/object-cache.php build/wp-content/object-cache.php
     215          docker run --name memcached --net $(basename "$PWD")_wpdevnet -d memcached
     216
     217      - name: General debug information
     218        run: |
     219          npm --version
     220          node --version
     221          curl --version
     222          git --version
     223          svn --version
     224
     225      - name: Log running Docker containers
     226        run: docker ps -a
     227
     228      - name: WordPress Docker container debug information
     229        run: |
     230          docker -v
     231          docker-compose -v
     232          docker-compose run --rm mysql mysql --version
     233          docker-compose run --rm php php --version
     234          docker-compose run --rm php php -m
     235          docker-compose run --rm php php -i
     236          docker-compose run --rm php locale -a
     237
     238      - name: Install WordPress
     239        run: npm run env:install
     240
     241      - name: Run PHPUnit tests
     242        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist
     243
     244      - name: Run AJAX tests
     245        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group ajax
     246
     247      - name: Run tests as a multisite install
     248        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml
     249
     250      - name: Run mutlisite file tests
     251        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --group ms-files
     252
     253      - name: Run external HTTP tests
     254        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group external-http
     255
     256      - name: Run REST API tests
     257        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group restapi-jsclient
     258
     259      # Xdebug supports PHP 8 only from version 3.0, which is not released yet.
     260      # Once Xdebug 3.0 is released and included in the Docker image, the IF condition should be removed.
     261      # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
     262      - name: Run (xDebug) tests
     263        if: ${{ env.LOCAL_PHP != '8.0-fpm' }}
     264        run: LOCAL_PHP_XDEBUG=true npm run test:php -- -v --group xdebug --exclude-group __fakegroup__
     265
     266      - name: WordPress Test Reporter
     267        if: ${{ matrix.php_versions == '7.4' }}
     268        uses: actions/checkout@v2
     269        with:
     270          repository: 'WordPress/phpunit-test-runner'
     271          path: 'test-runner'
     272        # TODO: Configure hidden keys to successfully report test results.
     273        # run: docker-compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php
  • new file .github/workflows/verify-npm-on-windows.yml

    diff --git a/.github/workflows/verify-npm-on-windows.yml b/.github/workflows/verify-npm-on-windows.yml
    new file mode 100644
    index 0000000000..22997f4348
    - +  
     1name: Test NPM on Windows
     2
     3on:
     4  push:
     5    branches:
     6      - master
     7      - '*.*'
     8  pull_request:
     9
     10jobs:
     11  # Verifies that installing NPM dependencies and building WordPress works on Windows.
     12  #
     13  # Performs the following steps:
     14  # - Cancels all previous workflow runs that have not completed.
     15  # - Checks out the repository.
     16  # - Logs debug information about the runner container.
     17  # - Installs NodeJS 12 (todo: install the version of NPM specified in the `.nvmrc` file to support older branches)
     18  # - Sets up caching for NPM.
     19  # _ Installs NPM dependencies.
     20  # - Builds WordPress to run from the `build` directory.
     21  test-npm:
     22    name: Tests NPM on Windows
     23    runs-on: windows-latest
     24    steps:
     25      - name: Cancel previous runs of this workflow
     26        uses: styfle/cancel-workflow-action@0.5.0
     27        with:
     28          access_token: ${{ github.token }}
     29
     30      - name: Checkout repository
     31        uses: actions/checkout@v2
     32
     33      - name: Log debug information
     34        run: |
     35          npm --version
     36          node --version
     37          curl --version
     38          git --version
     39          svn --version
     40
     41      - name: Install NodeJS
     42        uses: actions/setup-node@v1
     43        with:
     44          node-version: 12
     45
     46      - name: Get NPM cache directory
     47        id: npm-cache
     48        run: echo "::set-output name=dir::$(npm config get cache)"
     49
     50      - name: Cache NodeJS modules
     51        uses: actions/cache@v2
     52        env:
     53          cache-name: cache-node-modules
     54        with:
     55          path: ${{ steps.npm-cache.outputs.dir }}
     56          key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
     57          restore-keys: |
     58            ${{ runner.os }}-npm-
     59
     60      - name: Install Dependencies
     61        run: npm ci
     62
     63      - name: Build WordPress
     64        run: npm run build
  • new file .github/workflows/welcome-new-contributors.yml

    diff --git a/.github/workflows/welcome-new-contributors.yml b/.github/workflows/welcome-new-contributors.yml
    new file mode 100644
    index 0000000000..bb04c8bc8a
    - +  
     1name: Welcome New Contributors
     2
     3on:
     4  pull_request:
     5    types: [ opened ]
     6
     7jobs:
     8  post-welcome-message:
     9    runs-on: ubuntu-latest
     10
     11    steps:
     12      - uses: bubkoo/welcome-action@v1
     13        with:
     14          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
     15          FIRST_PR_COMMENT: >
     16            Hi @{{ author }}! 👋
     17
     18
     19            Thank you for your contribution to WordPress! 💖
     20
     21
     22            It looks like this is your first pull request, so here are a few things to be aware of that may help you out.
     23
     24
     25            **No one monitors this repository for new pull requests.** Pull requests **must** be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description.
     26
     27
     28            **Pull requests are never merged on GitHub.** The WordPress codebase continues to be managed through the SVN repository that this one mirrors. But please feel free to use pull requests to work on any contribution you are making.
     29
     30
     31            More information about how GitHub pull requests can be used to contribute to WordPress can be found in [this blog post](https://make.wordpress.org/core/2020/02/21/working-on-trac-tickets-using-github-pull-requests/).
     32
     33
     34            Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the [Automated Testing](https://make.wordpress.org/core/handbook/testing/automated-testing/) page in the handbook.
     35
     36
     37            If you have not had a chance, please review the [Contribute with Code page](https://make.wordpress.org/core/handbook/contribute/) in the [WordPress Core Handbook](https://make.wordpress.org/core/handbook/).
     38
     39
     40            The [Developer Hub](https://developer.wordpress.org/) also documents the various [coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/) that are followed:
     41
     42            - [PHP Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/)
     43
     44            - [CSS Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/)
     45
     46            - [HTML Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/html/)
     47
     48            - [JavaScript Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/)
     49
     50            - [Accessibility Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/accessibility/)
     51
     52            - [Inline Documentation Standards](https://developer.wordpress.org/coding-standards/inline-documentation-standards/)
     53
     54
     55            Please remember that the WordPress project is largely maintained by volunteers
     56
     57
     58            Thank you,
     59
     60            The WordPress Project
  • src/wp-includes/class-wp-hook.php

    diff --git a/src/wp-includes/class-wp-hook.php b/src/wp-includes/class-wp-hook.php
    index e2c9cf2368..adf05ebd59 100644
    a b final class WP_Hook implements Iterator, ArrayAccess { 
    2323         * @since 4.7.0
    2424         * @var array
    2525         */
    26         public $callbacks = array();
     26        public $callbacks=array();
    2727
    2828        /**
    2929         * The priority keys of actively running iterations of a hook.
  • src/wp-includes/plugin.php

    diff --git a/src/wp-includes/plugin.php b/src/wp-includes/plugin.php
    index 6ba09d2b9a..f1bfb23b63 100644
    a b function apply_filters_ref_array( $tag, $args ) { 
    231231        // Do 'all' actions first.
    232232        if ( isset( $wp_filter['all'] ) ) {
    233233                $wp_current_filter[] = $tag;
    234                 $all_args            = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
     234                $all_args            = func_get_args();
    235235                _wp_call_all_hook( $all_args );
    236236        }
    237237
  • src/wp-includes/wp-db.php

    diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
    index 80c117c1a0..075d2362c4 100644
    a b  
    1212/**
    1313 * @since 0.71
    1414 */
    15 define( 'EZSQL_VERSION', 'WP1.25' );
     15define('EZSQL_VERSION', 'WP1.25');
    1616
    1717/**
    1818 * @since 0.71