Uh oh!
There was an error while loading. Please reload this page.
Test UserNotes\Sorter - #606
Conversation
We add a copy of the latest run-tests.php from the PHP-8.0 branch, and tests for the `UserNotes\Sorter` with full code coverage.
localheinz
commented
Jul 3, 2022
How about running these tests on GitHub Actions? See cmb69#1 and localheinz#3. |
cmb69
commented
Jul 3, 2022
Yes, by all means! I didn't set up CI, because I saw PR #605, so wasn't quite sure. |
localheinz
commented
Jul 3, 2022
Enhancement: Run tests on GitHub Actions
kamil-tekiela
commented
Jul 3, 2022
I am getting test failures: Any idea what I am doing wrong? |
localheinz
commented
Jul 3, 2022
Which PHP version are you using? |
kamil-tekiela
commented
Jul 3, 2022
|
localheinz
commented
Jul 3, 2022
I'm getting similar test failures on
Looks like something changed in regard to the precision. |
Is there a way to run the tests without producing any files on failure? |
localheinz
commented
Jul 3, 2022
How do you feel about moving the tests? diff --git a/tests/sort_notes_001.phpt b/tests/UserNotes/Sorter/sort_notes_001.phpt
similarity index 96%
rename from tests/sort_notes_001.phpt
rename to tests/UserNotes/Sorter/sort_notes_001.phpt
index adc07611..e9bfac6e 100644
--- a/tests/sort_notes_001.phpt+++ b/tests/UserNotes/Sorter/sort_notes_001.phpt@@ -2,7 +2,7 @@
sort some notes
--FILE--
<?php
-require_once __DIR__ . "/../src/UserNotes/Sorter.php";+require_once __DIR__ . "/../../src/UserNotes/Sorter.php";
$notes = [
[
diff --git a/tests/sort_notes_002.phpt b/tests/UserNotes/Sorter/sort_notes_002.phpt
similarity index 89%
rename from tests/sort_notes_002.phpt
rename to tests/UserNotes/Sorter/sort_notes_002.phpt
index def6d4b1..51387dcb 100644
--- a/tests/sort_notes_002.phpt+++ b/tests/UserNotes/Sorter/sort_notes_002.phpt@@ -2,7 +2,7 @@
sort no notes
--FILE--
<?php
-require_once __DIR__ . "/../src/UserNotes/Sorter.php";+require_once __DIR__ . "/../../src/UserNotes/Sorter.php";
$notes = [];
diff --git a/tests/sort_notes_003.phpt b/tests/UserNotes/Sorter/sort_notes_003.phpt
similarity index 93%
rename from tests/sort_notes_003.phpt
rename to tests/UserNotes/Sorter/sort_notes_003.phpt
index 9e088464..c03af237 100644
--- a/tests/sort_notes_003.phpt+++ b/tests/UserNotes/Sorter/sort_notes_003.phpt@@ -2,7 +2,7 @@
sort a single note with no votes
--FILE--
<?php
-require_once __DIR__ . "/../src/UserNotes/Sorter.php";+require_once __DIR__ . "/../../src/UserNotes/Sorter.php";
$notes = [
[ |
cmb69
commented
Jul 3, 2022
Yeah, I actually expected this; But I'm more concerned about
That is a segfault (aka. access violation on Windows). Maybe it is "just" the old revision (8.0.3).
I don't think so, but there are
I think this is a good idea. The basenames could then be shorted: |
kamil-tekiela
commented
Jul 3, 2022
FWIW with 8.1.4 I only get precision errors and no segfaults. I don't have any other PHP 8.0 version installed at the moment, but maybe I will download a newer one and test again |
We also adjust the test expectations.
cmb69
commented
Jul 3, 2022
@kamil-tekiela, I just pushed a commit which is supposed to resolve the precision issue. |
kamil-tekiela
commented
Jul 3, 2022
PHP 7.4 - I get some completely different output. |
Uh oh!
There was an error while loading. Please reload this page.
cmb69
commented
Jul 3, 2022
The current tests pass for me with PHP 7.4.19 and 8.0.19 (haven't tested other versions). |
kamil-tekiela
commented
Jul 3, 2022
I downloaded 8.0.20 and no more segfaults. On PHP 7.4.9, the output is: |
cmb69
commented
Jul 3, 2022
I get these results with |
Uh oh!
There was an error while loading. Please reload this page.
Fix: Run build on PHP 7.3 instead of PHP 7.2
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Andreas Möller <am@localheinz.com>
Co-authored-by: Andreas Möller <am@localheinz.com>
Co-authored-by: Andreas Möller <am@localheinz.com>
kamil-tekiela
left a comment
There was a problem hiding this comment.
I don't know much about GH actions to judge if it's correct, but the rest looks fine to me.
cmb69
commented
Jul 5, 2022
Well, then let's merge this; we can still improve the GH action integration if need be. |
We add a copy of the latest run-tests.php from the PHP-8.0 branch, and
tests for the
UserNotes\Sorterwith full code coverage.