danhper / fundle

A minimalist package manager for fish shell
MIT License
375 stars 22 forks source link

CI: Fix broken runners, update Fishtape & tests #55

Closed SirWrexes closed 2 years ago

SirWrexes commented 3 years ago

The url was writing "404: Not found" in a file instead of Fishtape, and the test runner was trying to interpret that. The URL should now be poiting at the right file.

SirWrexes commented 3 years ago

Looks like it brought up a lot more other issues. 😨

SirWrexes commented 3 years ago

I see at commit #52f208c you changed the provider for Fishtape. Likely some compatibility issues came up. I'll check the log and see if I can help.

SirWrexes commented 3 years ago

Tests should be fixed. If they are and the Travis CI gives a positive result, I will squash the commits into one. I will keep the list of changes in the commit description.

SirWrexes commented 3 years ago

Okay so the Xenial runner with FISH_PPA=release-2 fails because its version of Fish is too old and doesn't support some syntax that is used in Fishtape. image

fish -c 'for file in test/*_test.fish; fishtape $file; end'
~/.config/fish/functions/fishtape.fish (line 53): Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.
                set --query argv[2] || set --append argv ""
                                     ^
from sourcing file ~/.config/fish/functions/fishtape.fish
    called on standard input
in command substitution
    called on standard input
source: Error while reading file “/home/travis/.config/fish/functions/fishtape.fish”

The MacOS one fails because it cannot find the Fish packet. image Also, in prepare-ci.sh, line 12, I see brew instal (missing one l). I don't know if this is intentional, though it doesn't seem to cause any trouble.

And lastly, the runner using FISH_PPA=nightly-master surprisingly doesn't fail... But it still doesn't function properly. Its version of git init doesn't support the -b switch... So a retro compatibility problem too. image

SirWrexes commented 3 years ago

@jorgebucaran continung the discussion about runner settings and Fish version here... I agree with you there is no reason not to use Fish >3.0. So I suppose that would mean replacing FISH_PPA=release-2 with FISH_PPA=release-3 for the release test suite. And I guess I should look into the docs of the Travis CI to see if it is possible to get some updated runners; with a working Fish package for the macOS one as well as a git version that supports the -b flag for the init subcommand in the Xenial one. :thinking: I suppose all of the Travis CI settings are located in .travis.yml right ?

SirWrexes commented 3 years ago

Heck yeah !

Build jobs now work, and I've checked the logs, everything is in order ! The issue was indeed a retro compatibility thing.

Travis CI uses Ubuntu Xenial 16.04 as well as macOS 13.0.1 by default, which are both quite old. When testing apps with long term support, it makes sense, but since Fundle uses a 2020 git feature this is out of the question. I enforced using the latest versions of the two and voilà.

Now I'll try to rewrite the Travis config a little more elegantly... Mainly try to getting rid of make, which doesn't fail a job even if some tests do fail. Also maybe getting rid of prepare-ci.sh which doesn't really seem all that necessary.

After that, I'll cleanup the commit history and do a last push, and then this PR should be ready for merging !

SirWrexes commented 3 years ago

Aaaaaand it's done ! Your tests are up to date and working perfectly. Have a good day ! (ノ^ _^)ノ*:・゚✧

danhper commented 2 years ago

@SirWrexes I'm so sorry I never realized this PR was open, it must have slipped through my inbox. Thanks so much for fixing all this