~ancarda/high-test-coverage

6f0007886977f90f075dc23aad6af6e9c58733f2 — Mark Dain 2 months ago 9d56cc4
CI improvements and fixes

Fix builds to run correctly on PHP 7.3 and ping Packagist to sync on
every push.
4 files changed, 97 insertions(+), 148 deletions(-)

M .builds/php7_3.yml
M .builds/poke-packagist
M composer.json
M composer.lock
M .builds/php7_3.yml => .builds/php7_3.yml +2 -2
@@ 2,7 2,7 @@
image: debian/buster

secrets:
 - 1e8d3317-4624-41c5-951e-62b536902cfa
 - cde47d09-64da-4651-a62e-bf762c4dec73

sources:
  - https://git.sr.ht/~ancarda/high-test-coverage


@@ 31,4 31,4 @@ tasks:
  - test:        cd $DIR && composer run-script test
  - check-cov:   cd $DIR && composer run-script check-coverage
  - check-tests: cd $DIR && composer run-script check-tests
  - packagist:   cd $DIR && .builds/poke-packagist ancarda high-test-coverage ~/.packagist
  - packagist:   cd $DIR && .builds/poke-packagist ancarda coverage-enforcer ~/.packagist-api-token

M .builds/poke-packagist => .builds/poke-packagist +2 -2
@@ 1,5 1,5 @@
#!/bin/sh
echo curl -X POST \
curl -X POST \
	-H 'content-type:application/json' \
	"https://packagist.org/api/update-package?username=${1}&apiToken=${3}" \
	"https://packagist.org/api/update-package?username=${1}&apiToken=$(cat $3)" \
	--data "{\"repository\":{\"url\":\"https://packagist.org/packages/${1}/${2}\"}}"

M composer.json => composer.json +5 -1
@@ 4,6 4,9 @@
    "type": "library",
    "license": "MIT",
    "config": {
        "platform": {
            "php": "7.3"
        },
        "sort-packages": true
    },
    "autoload": {


@@ 21,7 24,8 @@
    },
    "require-dev": {
        "ancarda/coverage-enforcer": "^1.0",
        "infection/infection": "^0.21.4",
        "composer/package-versions-deprecated": "1.11.99.1",
        "infection/infection": "^0.18.2",
        "phpstan/phpstan": "^0.12.82",
        "phpstan/phpstan-phpunit": "^0.12.18",
        "phpstan/phpstan-strict-rules": "^0.12.9",

M composer.lock => composer.lock +88 -143
@@ 4,7 4,7 @@
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
        "This file is @generated automatically"
    ],
    "content-hash": "a97af0e976870bd7d404713e667bbe31",
    "content-hash": "a37bc1133ac397a9528aadb6d7eb9ecb",
    "packages": [],
    "packages-dev": [
        {


@@ 37,6 37,79 @@
            "time": "2021-03-25T15:47:39+00:00"
        },
        {
            "name": "composer/package-versions-deprecated",
            "version": "1.11.99.1",
            "source": {
                "type": "git",
                "url": "https://github.com/composer/package-versions-deprecated.git",
                "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6",
                "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6",
                "shasum": ""
            },
            "require": {
                "composer-plugin-api": "^1.1.0 || ^2.0",
                "php": "^7 || ^8"
            },
            "replace": {
                "ocramius/package-versions": "1.11.99"
            },
            "require-dev": {
                "composer/composer": "^1.9.3 || ^2.0@dev",
                "ext-zip": "^1.13",
                "phpunit/phpunit": "^6.5 || ^7"
            },
            "type": "composer-plugin",
            "extra": {
                "class": "PackageVersions\\Installer",
                "branch-alias": {
                    "dev-master": "1.x-dev"
                }
            },
            "autoload": {
                "psr-4": {
                    "PackageVersions\\": "src/PackageVersions"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Marco Pivetta",
                    "email": "ocramius@gmail.com"
                },
                {
                    "name": "Jordi Boggiano",
                    "email": "j.boggiano@seld.be"
                }
            ],
            "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
            "support": {
                "issues": "https://github.com/composer/package-versions-deprecated/issues",
                "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1"
            },
            "funding": [
                {
                    "url": "https://packagist.com",
                    "type": "custom"
                },
                {
                    "url": "https://github.com/composer",
                    "type": "github"
                },
                {
                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
                    "type": "tidelift"
                }
            ],
            "time": "2020-11-11T10:22:58+00:00"
        },
        {
            "name": "composer/xdebug-handler",
            "version": "1.4.6",
            "source": {


@@ 318,16 391,16 @@
        },
        {
            "name": "infection/infection",
            "version": "0.21.4",
            "version": "0.18.2",
            "source": {
                "type": "git",
                "url": "https://github.com/infection/infection.git",
                "reference": "2ca5fd6ef8d291bf6577936bd8e25b5a2cf0cc09"
                "reference": "05685f8e97ec2d42455fdaad6984446d5af2f67e"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/infection/infection/zipball/2ca5fd6ef8d291bf6577936bd8e25b5a2cf0cc09",
                "reference": "2ca5fd6ef8d291bf6577936bd8e25b5a2cf0cc09",
                "url": "https://api.github.com/repos/infection/infection/zipball/05685f8e97ec2d42455fdaad6984446d5af2f67e",
                "reference": "05685f8e97ec2d42455fdaad6984446d5af2f67e",
                "shasum": ""
            },
            "require": {


@@ 339,12 412,11 @@
                "infection/extension-installer": "^0.1.0",
                "infection/include-interceptor": "^0.2.4",
                "justinrainbow/json-schema": "^5.2",
                "nikic/php-parser": "^4.10.3",
                "nikic/php-parser": "^4.10.2",
                "ocramius/package-versions": "^1.2 || ^2.0",
                "ondram/ci-detector": "^3.3.0",
                "php": "^7.4 || ^8.0",
                "sanmai/later": "^0.1.1",
                "sanmai/pipeline": "^5.1",
                "php": "^7.3 || ^8.0",
                "sanmai/pipeline": "^3.1 || ^5.0",
                "sebastian/diff": "^3.0.2 || ^4.0",
                "seld/jsonlint": "^1.7",
                "symfony/console": "^3.4.29 || ^4.1.19 || ^5.0",


@@ 360,16 432,16 @@
                "symfony/console": "=4.1.5"
            },
            "require-dev": {
                "composer/package-versions-deprecated": "^1.2 || ^2.0",
                "ext-simplexml": "*",
                "helmich/phpunit-json-assert": "^3.0",
                "phpspec/prophecy-phpunit": "^2.0",
                "phpstan/extension-installer": "^1.0",
                "phpstan/phpstan": "^0.12.8",
                "phpstan/phpstan-phpunit": "^0.12.6",
                "phpstan/phpstan-strict-rules": "^0.12.5",
                "phpstan/phpstan-webmozart-assert": "^0.12.2",
                "phpunit/phpunit": "^9.3.11",
                "symfony/phpunit-bridge": "^4.4.18 || ^5.1.10",
                "symfony/phpunit-bridge": "^4.4.14 || ^5.1.6",
                "symfony/yaml": "^5.0",
                "thecodingmachine/phpstan-safe-rule": "^1.0"
            },


@@ 427,19 499,9 @@
            ],
            "support": {
                "issues": "https://github.com/infection/infection/issues",
                "source": "https://github.com/infection/infection/tree/0.21.4"
                "source": "https://github.com/infection/infection/tree/0.18.2"
            },
            "funding": [
                {
                    "url": "https://github.com/infection",
                    "type": "github"
                },
                {
                    "url": "https://opencollective.com/infection",
                    "type": "open_collective"
                }
            ],
            "time": "2021-03-03T09:02:15+00:00"
            "time": "2020-10-21T20:25:38+00:00"
        },
        {
            "name": "justinrainbow/json-schema",


@@ 626,68 688,6 @@
            "time": "2020-12-20T10:01:03+00:00"
        },
        {
            "name": "ocramius/package-versions",
            "version": "2.1.0",
            "source": {
                "type": "git",
                "url": "https://github.com/Ocramius/PackageVersions.git",
                "reference": "a7e35c34bc166a5684a1e2f13da7b1d6a821349d"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/a7e35c34bc166a5684a1e2f13da7b1d6a821349d",
                "reference": "a7e35c34bc166a5684a1e2f13da7b1d6a821349d",
                "shasum": ""
            },
            "require": {
                "composer-runtime-api": "^2.0.0",
                "php": "^7.4.7 || ~8.0.0"
            },
            "replace": {
                "composer/package-versions-deprecated": "*"
            },
            "require-dev": {
                "composer/composer": "^2.0.0@dev",
                "doctrine/coding-standard": "^8.1.0",
                "ext-zip": "^1.15.0",
                "infection/infection": "dev-master#8d6c4d6b15ec58d3190a78b7774a5d604ec1075a",
                "phpunit/phpunit": "~9.3.11",
                "vimeo/psalm": "^4.0.1"
            },
            "type": "library",
            "autoload": {
                "psr-4": {
                    "PackageVersions\\": "src/PackageVersions"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Marco Pivetta",
                    "email": "ocramius@gmail.com"
                }
            ],
            "description": "Provides efficient querying for installed package versions (no runtime IO)",
            "support": {
                "issues": "https://github.com/Ocramius/PackageVersions/issues",
                "source": "https://github.com/Ocramius/PackageVersions/tree/2.1.0"
            },
            "funding": [
                {
                    "url": "https://github.com/Ocramius",
                    "type": "github"
                },
                {
                    "url": "https://tidelift.com/funding/github/packagist/ocramius/package-versions",
                    "type": "tidelift"
                }
            ],
            "time": "2020-10-21T13:48:04+00:00"
        },
        {
            "name": "ondram/ci-detector",
            "version": "3.5.1",
            "source": {


@@ 1781,64 1781,6 @@
            "time": "2020-03-23T09:12:05+00:00"
        },
        {
            "name": "sanmai/later",
            "version": "0.1.2",
            "source": {
                "type": "git",
                "url": "https://github.com/sanmai/later.git",
                "reference": "9b659fecef2030193fd02402955bc39629d5606f"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/sanmai/later/zipball/9b659fecef2030193fd02402955bc39629d5606f",
                "reference": "9b659fecef2030193fd02402955bc39629d5606f",
                "shasum": ""
            },
            "require": {
                "php": ">=7.1"
            },
            "require-dev": {
                "friendsofphp/php-cs-fixer": "^2.13",
                "infection/infection": ">=0.10.5",
                "phan/phan": ">=2",
                "php-coveralls/php-coveralls": "^2.0",
                "phpstan/phpstan": ">=0.10",
                "phpunit/phpunit": ">=7.4",
                "vimeo/psalm": ">=2"
            },
            "type": "library",
            "autoload": {
                "psr-4": {
                    "Later\\": "src/"
                },
                "files": [
                    "src/functions.php"
                ]
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "Apache-2.0"
            ],
            "authors": [
                {
                    "name": "Alexey Kopytko",
                    "email": "alexey@kopytko.com"
                }
            ],
            "description": "Later: deferred wrapper object",
            "support": {
                "issues": "https://github.com/sanmai/later/issues",
                "source": "https://github.com/sanmai/later/tree/0.1.2"
            },
            "funding": [
                {
                    "url": "https://github.com/sanmai",
                    "type": "github"
                }
            ],
            "time": "2021-01-02T10:26:44+00:00"
        },
        {
            "name": "sanmai/pipeline",
            "version": "v5.1.0",
            "source": {


@@ 4223,5 4165,8 @@
        "php": "^7.3|^8.0"
    },
    "platform-dev": [],
    "platform-overrides": {
        "php": "7.3"
    },
    "plugin-api-version": "2.0.0"
}