Fix tests and enable paralell testing

This commit is contained in:
Julien Nahum 2023-02-23 19:05:17 +01:00
parent 49d1a237ef
commit f3a8ca11fe
4 changed files with 107 additions and 111 deletions

View File

@ -2,6 +2,7 @@ name: laravel
on:
push:
branches: [ master ]
pull_request:
jobs:
@ -33,7 +34,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ 8.0 ]
php: [ 8.1 ]
name: Run Feature & Unit tests (PHP ${{ matrix.php }})
@ -78,7 +79,7 @@ jobs:
run: chmod -R 777 storage bootstrap/cache
- name: Run tests (Unit and Feature)
run: ./vendor/bin/pest
run: ./vendor/bin/pest -p
- name: "Archive log results"
if: always()

View File

@ -54,7 +54,7 @@
"pestphp/pest": "^1.15",
"pestphp/pest-plugin-faker": "^1.0",
"pestphp/pest-plugin-laravel": "^1.1",
"pestphp/pest-plugin-parallel": "^1.0",
"pestphp/pest-plugin-parallel": "^1.2",
"phpunit/phpunit": "^9.3.3",
"spatie/laravel-ignition": "^1.0",
"spatie/laravel-ray": "^1.17"

209
composer.lock generated
View File

@ -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": "2e93597a584b3252f740cd2bd6e0a0da",
"content-hash": "417c01c6f73f7e870992a7d71e75f363",
"packages": [
{
"name": "asm89/stack-cors",
@ -4755,16 +4755,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.15.2",
"version": "v4.15.3",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc"
"reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
"reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039",
"reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039",
"shasum": ""
},
"require": {
@ -4805,9 +4805,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3"
},
"time": "2022-11-12T15:38:23+00:00"
"time": "2023-01-16T22:05:37+00:00"
},
{
"name": "nunomaduro/termwind",
@ -7521,16 +7521,16 @@
},
{
"name": "symfony/console",
"version": "v6.2.3",
"version": "v6.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "0f579613e771dba2dbb8211c382342a641f5da06"
"reference": "3e294254f2191762c1d137aed4b94e966965e985"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/0f579613e771dba2dbb8211c382342a641f5da06",
"reference": "0f579613e771dba2dbb8211c382342a641f5da06",
"url": "https://api.github.com/repos/symfony/console/zipball/3e294254f2191762c1d137aed4b94e966965e985",
"reference": "3e294254f2191762c1d137aed4b94e966965e985",
"shasum": ""
},
"require": {
@ -7597,7 +7597,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v6.2.3"
"source": "https://github.com/symfony/console/tree/v6.2.5"
},
"funding": [
{
@ -7613,7 +7613,7 @@
"type": "tidelift"
}
],
"time": "2022-12-28T14:26:22+00:00"
"time": "2023-01-01T08:38:09+00:00"
},
{
"name": "symfony/css-selector",
@ -9513,16 +9513,16 @@
},
{
"name": "symfony/process",
"version": "v6.2.0",
"version": "v6.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877"
"reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/ba6e55359f8f755fe996c58a81e00eaa67a35877",
"reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877",
"url": "https://api.github.com/repos/symfony/process/zipball/9ead139f63dfa38c4e4a9049cc64a8b2748c83b7",
"reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7",
"shasum": ""
},
"require": {
@ -9554,7 +9554,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v6.2.0"
"source": "https://github.com/symfony/process/tree/v6.2.5"
},
"funding": [
{
@ -9570,7 +9570,7 @@
"type": "tidelift"
}
],
"time": "2022-11-02T09:08:04+00:00"
"time": "2023-01-01T08:38:09+00:00"
},
{
"name": "symfony/psr-http-message-bridge",
@ -9835,16 +9835,16 @@
},
{
"name": "symfony/string",
"version": "v6.2.2",
"version": "v6.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "863219fd713fa41cbcd285a79723f94672faff4d"
"reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/863219fd713fa41cbcd285a79723f94672faff4d",
"reference": "863219fd713fa41cbcd285a79723f94672faff4d",
"url": "https://api.github.com/repos/symfony/string/zipball/b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0",
"reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0",
"shasum": ""
},
"require": {
@ -9901,7 +9901,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v6.2.2"
"source": "https://github.com/symfony/string/tree/v6.2.5"
},
"funding": [
{
@ -9917,7 +9917,7 @@
"type": "tidelift"
}
],
"time": "2022-12-14T16:11:27+00:00"
"time": "2023-01-01T08:38:09+00:00"
},
{
"name": "symfony/translation",
@ -10907,16 +10907,16 @@
},
{
"name": "brianium/paratest",
"version": "v6.8.0",
"version": "v6.9.0",
"source": {
"type": "git",
"url": "https://github.com/paratestphp/paratest.git",
"reference": "4b70abf4c2ffa08c64e2e89c7b5b7e43cdf26d52"
"reference": "6f90dcaf14077a64c966936584b301dd4d01a440"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/4b70abf4c2ffa08c64e2e89c7b5b7e43cdf26d52",
"reference": "4b70abf4c2ffa08c64e2e89c7b5b7e43cdf26d52",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/6f90dcaf14077a64c966936584b301dd4d01a440",
"reference": "6f90dcaf14077a64c966936584b301dd4d01a440",
"shasum": ""
},
"require": {
@ -10924,25 +10924,25 @@
"ext-pcre": "*",
"ext-reflection": "*",
"ext-simplexml": "*",
"fidry/cpu-core-counter": "^0.4.1",
"fidry/cpu-core-counter": "^0.4.1 || ^0.5.1",
"jean85/pretty-package-versions": "^2.0.5",
"php": "^7.3 || ^8.0",
"phpunit/php-code-coverage": "^9.2.23",
"phpunit/php-code-coverage": "^9.2.24",
"phpunit/php-file-iterator": "^3.0.6",
"phpunit/php-timer": "^5.0.3",
"phpunit/phpunit": "^9.5.27",
"phpunit/phpunit": "^9.6.3",
"sebastian/environment": "^5.1.4",
"symfony/console": "^5.4.16 || ^6.2.3",
"symfony/process": "^5.4.11 || ^6.2"
"symfony/console": "^5.4.16 || ^6.2.5",
"symfony/process": "^5.4.11 || ^6.2.5"
},
"require-dev": {
"doctrine/coding-standard": "^10.0.0",
"ext-pcov": "*",
"ext-posix": "*",
"infection/infection": "^0.26.16",
"infection/infection": "^0.26.19",
"squizlabs/php_codesniffer": "^3.7.1",
"symfony/filesystem": "^5.4.13 || ^6.2",
"vimeo/psalm": "^5.4"
"symfony/filesystem": "^5.4.13 || ^6.2.5",
"vimeo/psalm": "^5.6"
},
"bin": [
"bin/paratest",
@ -10983,7 +10983,7 @@
],
"support": {
"issues": "https://github.com/paratestphp/paratest/issues",
"source": "https://github.com/paratestphp/paratest/tree/v6.8.0"
"source": "https://github.com/paratestphp/paratest/tree/v6.9.0"
},
"funding": [
{
@ -10995,7 +10995,7 @@
"type": "paypal"
}
],
"time": "2022-12-29T09:42:35+00:00"
"time": "2023-02-07T10:03:32+00:00"
},
{
"name": "composer/pcre",
@ -11070,30 +11070,30 @@
},
{
"name": "doctrine/instantiator",
"version": "1.5.0",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
"reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
"reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
"reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
"php": "^8.1"
},
"require-dev": {
"doctrine/coding-standard": "^9 || ^11",
"doctrine/coding-standard": "^11",
"ext-pdo": "*",
"ext-phar": "*",
"phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.30 || ^5.4"
"phpbench/phpbench": "^1.2",
"phpstan/phpstan": "^1.9.4",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^9.5.27",
"vimeo/psalm": "^5.4"
},
"type": "library",
"autoload": {
@ -11120,7 +11120,7 @@
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/1.5.0"
"source": "https://github.com/doctrine/instantiator/tree/2.0.0"
},
"funding": [
{
@ -11136,7 +11136,7 @@
"type": "tidelift"
}
],
"time": "2022-12-30T00:15:36+00:00"
"time": "2022-12-30T00:23:10+00:00"
},
{
"name": "fakerphp/faker",
@ -11208,16 +11208,16 @@
},
{
"name": "fidry/cpu-core-counter",
"version": "0.4.1",
"version": "0.5.1",
"source": {
"type": "git",
"url": "https://github.com/theofidry/cpu-core-counter.git",
"reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2"
"reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/79261cc280aded96d098e1b0e0ba0c4881b432c2",
"reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2",
"url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623",
"reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623",
"shasum": ""
},
"require": {
@ -11257,7 +11257,7 @@
],
"support": {
"issues": "https://github.com/theofidry/cpu-core-counter/issues",
"source": "https://github.com/theofidry/cpu-core-counter/tree/0.4.1"
"source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1"
},
"funding": [
{
@ -11265,7 +11265,7 @@
"type": "github"
}
],
"time": "2022-12-16T22:01:02+00:00"
"time": "2022-12-24T12:35:10+00:00"
},
{
"name": "filp/whoops",
@ -12064,21 +12064,21 @@
},
{
"name": "pestphp/pest-plugin-parallel",
"version": "v1.2.0",
"version": "v1.2.1",
"source": {
"type": "git",
"url": "https://github.com/pestphp/pest-plugin-parallel.git",
"reference": "7ae93d4052d2f45c0a37ca34f5dea940fb28cf31"
"reference": "842592eba2439ba6477f6d6c7ee4a4e7bccdcd10"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pestphp/pest-plugin-parallel/zipball/7ae93d4052d2f45c0a37ca34f5dea940fb28cf31",
"reference": "7ae93d4052d2f45c0a37ca34f5dea940fb28cf31",
"url": "https://api.github.com/repos/pestphp/pest-plugin-parallel/zipball/842592eba2439ba6477f6d6c7ee4a4e7bccdcd10",
"reference": "842592eba2439ba6477f6d6c7ee4a4e7bccdcd10",
"shasum": ""
},
"require": {
"brianium/paratest": "^6.4.2",
"pestphp/pest-plugin": "^1.0",
"brianium/paratest": "^6.8.1",
"pestphp/pest-plugin": "^1.1.0",
"php": "^7.3 || ^8.0"
},
"conflict": {
@ -12087,12 +12087,8 @@
"pestphp/pest": "<1.16"
},
"require-dev": {
"ergebnis/phpstan-rules": "^1.0.0",
"pestphp/pest": "1.x-dev",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-strict-rules": "^1.3",
"symfony/var-dumper": "^5.0 || ^6.0",
"thecodingmachine/phpstan-strict-rules": "^1.0"
"pestphp/pest": "^1.22.3",
"pestphp/pest-dev-tools": "^1.0.0"
},
"type": "library",
"extra": {
@ -12100,9 +12096,6 @@
"plugins": [
"Pest\\Parallel\\Plugin"
]
},
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
@ -12135,7 +12128,7 @@
"unit"
],
"support": {
"source": "https://github.com/pestphp/pest-plugin-parallel/tree/v1.2.0"
"source": "https://github.com/pestphp/pest-plugin-parallel/tree/v1.2.1"
},
"funding": [
{
@ -12167,7 +12160,7 @@
"type": "patreon"
}
],
"time": "2022-07-06T08:38:19+00:00"
"time": "2023-02-03T13:01:17+00:00"
},
{
"name": "phar-io/manifest",
@ -12455,16 +12448,16 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.23",
"version": "9.2.24",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c"
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
"reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed",
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed",
"shasum": ""
},
"require": {
@ -12520,7 +12513,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24"
},
"funding": [
{
@ -12528,7 +12521,7 @@
"type": "github"
}
],
"time": "2022-12-28T12:41:10+00:00"
"time": "2023-01-26T08:26:55+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -12773,20 +12766,20 @@
},
{
"name": "phpunit/phpunit",
"version": "9.5.27",
"version": "9.6.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "a2bc7ffdca99f92d959b3f2270529334030bba38"
"reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38",
"reference": "a2bc7ffdca99f92d959b3f2270529334030bba38",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7b1615e3e887d6c719121c6d4a44b0ab9645555",
"reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.3.1",
"doctrine/instantiator": "^1.3.1 || ^2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
@ -12824,7 +12817,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "9.5-dev"
"dev-master": "9.6-dev"
}
},
"autoload": {
@ -12855,7 +12848,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.3"
},
"funding": [
{
@ -12871,7 +12864,7 @@
"type": "tidelift"
}
],
"time": "2022-12-09T07:31:23+00:00"
"time": "2023-02-04T13:37:15+00:00"
},
{
"name": "pimple/pimple",
@ -13292,16 +13285,16 @@
},
{
"name": "sebastian/environment",
"version": "5.1.4",
"version": "5.1.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
"reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
"reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
"shasum": ""
},
"require": {
@ -13343,7 +13336,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
},
"funding": [
{
@ -13351,7 +13344,7 @@
"type": "github"
}
],
"time": "2022-04-03T09:37:03+00:00"
"time": "2023-02-03T06:03:51+00:00"
},
{
"name": "sebastian/exporter",
@ -13665,16 +13658,16 @@
},
{
"name": "sebastian/recursion-context",
"version": "4.0.4",
"version": "4.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "cd9d8cf3c5804de4341c283ed787f099f5506172"
"reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172",
"reference": "cd9d8cf3c5804de4341c283ed787f099f5506172",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
"reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
"shasum": ""
},
"require": {
@ -13713,10 +13706,10 @@
}
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"homepage": "https://github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
"source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4"
"source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5"
},
"funding": [
{
@ -13724,7 +13717,7 @@
"type": "github"
}
],
"time": "2020-10-26T13:17:30+00:00"
"time": "2023-02-03T06:07:39+00:00"
},
{
"name": "sebastian/resource-operations",
@ -13783,16 +13776,16 @@
},
{
"name": "sebastian/type",
"version": "3.2.0",
"version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
"reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e"
"reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
"reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
"reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
"shasum": ""
},
"require": {
@ -13827,7 +13820,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
"source": "https://github.com/sebastianbergmann/type/tree/3.2.0"
"source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
},
"funding": [
{
@ -13835,7 +13828,7 @@
"type": "github"
}
],
"time": "2022-09-12T14:47:03+00:00"
"time": "2023-02-03T06:13:03+00:00"
},
{
"name": "sebastian/version",

View File

@ -2,6 +2,8 @@
uses(\Tests\TestCase::class);
use \Illuminate\Support\Str;
it('can parse filenames', function () {
$fileName = 'Notion_app_logo_85e16d7b-58ed-43bc-8dce-7d3ff7d69f41.png';
$parsedFilename = \App\Service\Storage\StorageFileNameParser::parse($fileName);