skaji / mi6

minimal authoring tool for Raku
https://raku.land/zef:skaji/App::Mi6
Artistic License 2.0
54 stars 18 forks source link

Tests always come back failed, but "mi6 test" is clean #98

Closed lizmat closed 4 years ago

lizmat commented 4 years ago

The latest version of App::Mi6 appears to add a .github/workflows/test.yml, which is great.

However, none of the tests come out clean for me, where prove6 -l t does run clean locally.

Am I missing something? Is there something amiss in the ecosystem?

Example link: https://github.com/lizmat/API-Discogs/actions/runs/183154645

skaji commented 4 years ago

The action in the example link fails in actions/checkout@v2 step, which seems to be a github action platform issue.

skaji commented 4 years ago
error: invalid path 't/client/database/search?q=nirvana.json'

The filename of 't/client/database/search?q=nirvana.json' may be invalid on windows.

lizmat commented 4 years ago

Ok that seems to help for the Ubuntu case. The Windows case here seems to die on installing App::Prove:

===> Searching for: App::Prove6
37
Terminate batch job (Y/N)? 

https://github.com/lizmat/API-Discogs/runs/911843185

Perhaps it's taking too long?

skaji commented 4 years ago

https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast GitHub defaults to cancel all in-progress jobs if any matrix job fails.

Macos job fails, so windows job cancels.

skaji commented 4 years ago

I suspect the cause of the test failure of macos is OpenSSL module.

On my macbook, I got

❯ raku -Ilib -MOpenSSL -e1
zsh: abort      raku -Ilib -MOpenSSL -e1
skaji commented 4 years ago

If you use the homebrew's absolute path for libraries, then OpenSSL module will work.

diff --git lib/OpenSSL/NativeLib.pm6 lib/OpenSSL/NativeLib.pm6
index 4316bf1..704c4f1 100644
--- lib/OpenSSL/NativeLib.pm6
+++ lib/OpenSSL/NativeLib.pm6
@@ -4,18 +4,21 @@ sub ssl-lib is export {
     state $lib = $*DISTRO.is-win
         ?? dll-resource('ssleay32.dll')
         !! $*VM.platform-library-name('ssl'.IO).Str;
+    "/usr/local/opt/openssl@1.1/lib/$lib";
 }

 sub gen-lib is export {
     state $lib = $*DISTRO.is-win
         ?? dll-resource('libeay32.dll')
         !! $*VM.platform-library-name('ssl'.IO).Str;
+    "/usr/local/opt/openssl@1.1/lib/$lib";
 }

 sub crypto-lib is export {
     state $lib = $*DISTRO.is-win
         ?? dll-resource('libeay32.dll')
         !! $*VM.platform-library-name('crypto'.IO).Str;
+    "/usr/local/opt/openssl@1.1/lib/$lib";
 }

 # Windows only
skaji commented 4 years ago

Here is an issue tracker for mi6, neither GitHub Actions nor OpenSSL :)

lizmat commented 4 years ago

I develop on MacOS:

$ raku -Ilib -MOpenSSL -e ""
$

Aka, clean...

skaji commented 4 years ago

macos "Run Tests" step in https://github.com/lizmat/API-Discogs/runs/912474996

Run prove6 -l t
t/01-basic.t .. No subtests run
All tests successful.

Test Summary Report
-------------------
t/01-basic.t (Wstat: 6 Tests: 0 Failed: 0)
Non-zero wait status: 6
  Parse errors: No plan found in TAP output
Files=1, Tests=0,  78 wallclock secs
Result: FAILED
##[error]Process completed with exit code 2.

Note that wait status: 6 means it was terminated by SIGABRT.

skaji commented 4 years ago

This is not an issue for mi6.

lizmat commented 4 years ago

True, but naive App::Mi6 users that have this Github functionality added, and start getting emails for each test failure, will be bothering you about this again. As they did not ask for this functionality.