Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on: [push, pull_request]
jobs:
blackbox:
uses: innmind/github-workflows/.github/workflows/black-box-matrix.yml@main
with:
tags: ci
coverage:
uses: innmind/github-workflows/.github/workflows/coverage-matrix.yml@main
secrets: inherit
with:
tags: ci
psalm:
uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@main
cs:
Expand Down
29 changes: 16 additions & 13 deletions proofs/functional.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
Path,
};
use Innmind\Immutable\Sequence;
use Innmind\BlackBox\Set;
use Innmind\BlackBox\{
Set,
Tag,
};

return static function() {
yield test(
Expand All @@ -48,7 +51,7 @@ static function($assert) {
->inMoreThan()
->seconds(1);
},
);
)->tag(Tag::local, Tag::ci);

yield proof(
'Carry value via the scope',
Expand Down Expand Up @@ -80,7 +83,7 @@ static function($assert, $initial, $modified) {
);
$assert->same($modified, $returned);
},
);
)->tag(Tag::local, Tag::ci);

yield proof(
'Retrieve the tasks results',
Expand All @@ -101,7 +104,7 @@ static function($assert, $value) {
);
$assert->same([$value], $values->toList());
},
);
)->tag(Tag::local, Tag::ci);

yield test(
'The scope is run asynchronously',
Expand Down Expand Up @@ -145,7 +148,7 @@ static function($os) {
->inMoreThan()
->seconds(2);
},
);
)->tag(Tag::local, Tag::ci);

yield test(
'The scope and tasks are run asynchronously',
Expand Down Expand Up @@ -201,7 +204,7 @@ static function($os) use (&$results) {
->inMoreThan()
->seconds(2);
},
);
)->tag(Tag::local, Tag::ci);

yield test(
'The scope and tasks are run asynchronously in different order',
Expand Down Expand Up @@ -258,7 +261,7 @@ static function($os) use (&$results) {
->inMoreThan()
->seconds(2);
},
);
)->tag(Tag::local, Tag::ci);

yield test(
'Streams read by lines are handled asynchronously',
Expand Down Expand Up @@ -337,7 +340,7 @@ static function($os) use ($assert, &$lines) {
$lines,
);
},
);
)->tag(Tag::local, Tag::ci);

yield test(
'Streams read by chunks are handled asynchronously',
Expand Down Expand Up @@ -401,7 +404,7 @@ static function($os) use ($assert, &$chunks) {
$chunks,
);
},
);
)->tag(Tag::local, Tag::ci);

yield test(
'HTTP requests are handled asynchronously',
Expand Down Expand Up @@ -451,7 +454,7 @@ static function($os) use ($assert, &$order) {
$order,
);
},
);
)->tag(Tag::local);

yield test(
'Discard results',
Expand All @@ -471,7 +474,7 @@ static function($assert) {

$assert->same(0, $results->size());
},
);
)->tag(Tag::local, Tag::ci);

yield proof(
'Limit concurrency',
Expand Down Expand Up @@ -505,7 +508,7 @@ static function($assert, $tasks, $max) {
((int) \ceil($tasks / $max)) + 1,
);
},
);
)->tag(Tag::local, Tag::ci);

yield test(
'Abort tasks',
Expand Down Expand Up @@ -562,5 +565,5 @@ static function() use (&$continue) {
->inMoreThan()
->seconds(1);
},
);
)->tag(Tag::local, Tag::ci);
};
Loading