Make WordPress Core

Changeset 50248


Ignore:
Timestamp:
02/08/2021 08:56:35 PM (3 years ago)
Author:
desrosj
Message:

Build/Test Tools: Backport the local Docker environment to the 4.0 branch.

This commit introduces the Docker-based local WordPress development environment to the 4.0 branch.

Merges [44176,45445,45745,45762,45783-45784,45800,45819,45885,46320,46999,47225,47912,48121,49267,49335,49358,49360,49362] to the 4.0 branch.
See #48301, #47767.

Location:
branches/4.0
Files:
11 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0

  • branches/4.0/package-lock.json

    r50218 r50248  
    55    "requires": true,
    66    "dependencies": {
     7        "@hapi/hoek": {
     8            "version": "9.1.1",
     9            "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.1.1.tgz",
     10            "integrity": "sha512-CAEbWH7OIur6jEOzaai83jq3FmKmv4PmX1JYfs9IrYcGEVI/lyL1EXJGCj7eFVJ0bg5QR8LMxBlEtA+xKiLpFw==",
     11            "dev": true
     12        },
     13        "@hapi/topo": {
     14            "version": "5.0.0",
     15            "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.0.0.tgz",
     16            "integrity": "sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw==",
     17            "dev": true,
     18            "requires": {
     19                "@hapi/hoek": "^9.0.0"
     20            }
     21        },
    722        "@mrmlnc/readdir-enhanced": {
    823            "version": "2.2.1",
     
    1934            "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
    2035            "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
     36            "dev": true
     37        },
     38        "@sideway/address": {
     39            "version": "4.1.1",
     40            "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.1.tgz",
     41            "integrity": "sha512-+I5aaQr3m0OAmMr7RQ3fR9zx55sejEYR2BFJaxL+zT3VM2611X0SHvPWIbAUBZVTn/YzYKbV8gJ2oT/QELknfQ==",
     42            "dev": true,
     43            "requires": {
     44                "@hapi/hoek": "^9.0.0"
     45            }
     46        },
     47        "@sideway/formula": {
     48            "version": "3.0.0",
     49            "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz",
     50            "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==",
     51            "dev": true
     52        },
     53        "@sideway/pinpoint": {
     54            "version": "2.0.0",
     55            "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz",
     56            "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==",
    2157            "dev": true
    2258        },
     
    346382            "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==",
    347383            "dev": true
     384        },
     385        "axios": {
     386            "version": "0.21.1",
     387            "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
     388            "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
     389            "dev": true,
     390            "requires": {
     391                "follow-redirects": "^1.10.0"
     392            }
    348393        },
    349394        "balanced-match": {
     
    17231768            }
    17241769        },
     1770        "dotenv": {
     1771            "version": "8.2.0",
     1772            "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
     1773            "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==",
     1774            "dev": true
     1775        },
     1776        "dotenv-expand": {
     1777            "version": "5.1.0",
     1778            "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
     1779            "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==",
     1780            "dev": true
     1781        },
    17251782        "download": {
    17261783            "version": "6.2.5",
     
    23482405            "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
    23492406            "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==",
     2407            "dev": true
     2408        },
     2409        "follow-redirects": {
     2410            "version": "1.13.2",
     2411            "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz",
     2412            "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==",
    23502413            "dev": true
    23512414        },
     
    41014164            }
    41024165        },
     4166        "joi": {
     4167            "version": "17.4.0",
     4168            "resolved": "https://registry.npmjs.org/joi/-/joi-17.4.0.tgz",
     4169            "integrity": "sha512-F4WiW2xaV6wc1jxete70Rw4V/VuMd6IN+a5ilZsxG4uYtUXWu2kq9W5P2dz30e7Gmw8RCbY/u/uk+dMPma9tAg==",
     4170            "dev": true,
     4171            "requires": {
     4172                "@hapi/hoek": "^9.0.0",
     4173                "@hapi/topo": "^5.0.0",
     4174                "@sideway/address": "^4.1.0",
     4175                "@sideway/formula": "^3.0.0",
     4176                "@sideway/pinpoint": "^2.0.0"
     4177            }
     4178        },
    41034179        "jpegtran-bin": {
    41044180            "version": "4.0.0",
     
    46314707            "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
    46324708            "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
    4633             "dev": true,
    4634             "optional": true
     4709            "dev": true
    46354710        },
    46364711        "mitt": {
     
    65416616            }
    65426617        },
     6618        "tslib": {
     6619            "version": "1.14.1",
     6620            "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
     6621            "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
     6622            "dev": true
     6623        },
    65436624        "tunnel-agent": {
    65446625            "version": "0.6.0",
     
    67696850            }
    67706851        },
     6852        "wait-on": {
     6853            "version": "5.2.1",
     6854            "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-5.2.1.tgz",
     6855            "integrity": "sha512-H2F986kNWMU9hKlI9l/ppO6tN8ZSJd35yBljMLa1/vjzWP++Qh6aXyt77/u7ySJFZQqBtQxnvm/xgG48AObXcw==",
     6856            "dev": true,
     6857            "requires": {
     6858                "axios": "^0.21.1",
     6859                "joi": "^17.3.0",
     6860                "lodash": "^4.17.20",
     6861                "minimist": "^1.2.5",
     6862                "rxjs": "^6.6.3"
     6863            },
     6864            "dependencies": {
     6865                "rxjs": {
     6866                    "version": "6.6.3",
     6867                    "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz",
     6868                    "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==",
     6869                    "dev": true,
     6870                    "requires": {
     6871                        "tslib": "^1.9.0"
     6872                    }
     6873                }
     6874            }
     6875        },
    67716876        "websocket-driver": {
    67726877            "version": "0.7.4",
  • branches/4.0/package.json

    r50218 r50248  
    1414    "license": "GPLv2 or later",
    1515    "devDependencies": {
     16        "dotenv": "^8.2.0",
     17        "dotenv-expand": "^5.1.0",
    1618        "grunt": "~1.3.0",
    1719        "grunt-autoprefixer": "~3.0.0",
     
    3234        "grunt-sass": "~3.1.0",
    3335        "matchdep": "~2.0.0",
    34         "sass": "^1.32.6"
     36        "sass": "^1.32.6",
     37        "wait-on": "5.2.1"
     38    },
     39    "scripts": {
     40        "build": "grunt build",
     41        "test": "grunt test",
     42        "watch": "grunt watch",
     43        "grunt": "grunt",
     44        "env:start": "node ./tools/local-env/scripts/start.js",
     45        "env:stop": "node ./tools/local-env/scripts/docker.js down",
     46        "env:restart": "npm run env:stop && npm run env:start",
     47        "env:clean": "node ./tools/local-env/scripts/docker.js down -v --remove-orphans",
     48        "env:reset": "node ./tools/local-env/scripts/docker.js down --rmi all -v --remove-orphans",
     49        "env:install": "node ./tools/local-env/scripts/install.js",
     50        "env:cli": "node ./tools/local-env/scripts/docker.js run cli",
     51        "env:logs": "node ./tools/local-env/scripts/docker.js logs",
     52        "env:pull": "node ./tools/local-env/scripts/docker.js pull",
     53        "test:php": "node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit"
    3554    }
    3655}
  • branches/4.0/tests/phpunit/tests/image/base.php

    r32148 r50248  
    3636
    3737    /**
    38      * Helper assertion for testing alpha on images
     38     * Helper assertion for testing alpha on images using GD library
    3939     *
    4040     * @param  string $image_path
     
    4242     * @param  int $alpha
    4343     */
    44     protected function assertImageAlphaAtPoint( $image_path, $point, $alpha ) {
     44    protected function assertImageAlphaAtPointGD( $image_path, $point, $alpha ) {
    4545        $im = imagecreatefrompng( $image_path );
    4646        $rgb = imagecolorat( $im, $point[0], $point[1] );
     
    4949
    5050        $this->assertEquals( $alpha, $colors['alpha'] );
     51    }
     52
     53    /**
     54     * Helper assertion for testing alpha on images using Imagick
     55     *
     56     * @param string $image_path
     57     * @param array $point      array(x,y)
     58     * @param int $expected
     59     */
     60    protected function assertImageAlphaAtPointImagick( $image_path, $point, $expected ) {
     61        $im = new Imagick( $image_path );
     62        $pixel = $im->getImagePixelColor( $point[0], $point[1] );
     63        $color = $pixel->getColorValue( imagick::COLOR_ALPHA );
     64        $this->assertEquals( $expected, $color );
    5165    }
    5266
  • branches/4.0/tests/phpunit/tests/image/editor_gd.php

    r29120 r50248  
    470470        $editor->save( $save_to_file );
    471471
    472         $this->assertImageAlphaAtPoint( $save_to_file, array( 0,0 ), 127 );
     472        $this->assertImageAlphaAtPointGD( $save_to_file, array( 0,0 ), 127 );
    473473
    474474        unlink( $save_to_file );
     
    490490        $editor->save( $save_to_file );
    491491
    492         $this->assertImageAlphaAtPoint( $save_to_file, array( 0,0 ), 127 );
     492        $this->assertImageAlphaAtPointGD( $save_to_file, array( 0,0 ), 127 );
    493493
    494494        unlink( $save_to_file );
  • branches/4.0/tests/phpunit/tests/image/editor_imagick.php

    r29120 r50248  
    470470        $editor->save( $save_to_file );
    471471
    472         $this->assertImageAlphaAtPoint( $save_to_file, array( 0,0 ), 127 );
     472        $im = new Imagick( $save_to_file );
     473        $pixel = $im->getImagePixelColor( 0, 0 );
     474        $expected = $pixel->getColorValue( imagick::COLOR_ALPHA );
     475
     476        $this->assertImageAlphaAtPointImagick( $save_to_file, array( 0,0 ), $expected );
    473477
    474478        unlink( $save_to_file );
     
    490494        $editor->save( $save_to_file );
    491495
    492         $this->assertImageAlphaAtPoint( $save_to_file, array( 0,0 ), 127 );
     496        $im = new Imagick( $save_to_file );
     497        $pixel = $im->getImagePixelColor( 0, 0 );
     498        $expected = $pixel->getColorValue( imagick::COLOR_ALPHA );
     499
     500        $this->assertImageAlphaAtPointImagick( $save_to_file, array( 0,0 ), $expected );
    493501
    494502        unlink( $save_to_file );
Note: See TracChangeset for help on using the changeset viewer.