When I run bin/journey_test.sh locally, it works perfectly.
However, reviewing the logs in Travis, in the solve_all_exercises() function, the for-loop that would iterate over the exercises simply does not execute... as if the exercises variable were empty.
Hey @FridaTveit, I suspect you did everything right and that there's something different in the Travis CI environment. Since you were in here last, you get dibs at taking point tackling this. Of course, lean on the group if it gets hairy. We're all in this together. ;)
Okay, will have a look! :)
It looks like it's happening because --join-output isn't a jq option in the version of jq being run... will look into finding another option to use. Is there a way of finding out which version of jq it's running?
Or is it possible to update the version of jq it's running, @jtigger?
Travis looks to have a global version (not sure what that is), but I wonder if we could override that with a before_install instruction?
Is there a way of finding out which version of jq it's running?
One trick I like is to put a little bit in the build script that tells each tool used which version it is. Something like jq --version. With that in the script, it is included in the build output. In fact, would have been a good thing to have in there in the first place. :)
Or is it possible to update the version of jq it's running, @jtigger?
Yeah, unless there's some restriction about pre-installed tools, sounds like the tack @stkent is suggestion is a good angle. Give it a whirl!
Okay, so what exactly do I need to add to .travis.yml (assuming that's where I need to add it)? sudo apt-get -y install jq? And is there any other way of testing that it works other than making a PR and checking the travis logs?
That install command looks good to me! And yes, since this issue is specific to the Travis environment, I think testing by opening and modifying a PR is probably the best option :)
Great question.
Yup, that's the right file: .travis.yml!
Personally, I'd look to see if adding jq to the addons section would install a newer version.
addons:
apt:
packages:
- tree
Yeah, one great way to do this is to enable Travis for your personal account and then on your fork of xjava. You'll find a bank of switches in your "Accounts"/"Profile" page.
Once enabled, you'll see that Travis builds even your branches. So you can continue to do your work on a branch as you normally do. When you push to your own repo, Travis kicks off the build on that branch.
@stkent: jinx!
@FridaTveit listen to @jtigger not me 馃槃
hehehehehe! All good advice, 'round. :)
Okay, will try that! Thanks :)
I tried both but neither worked :( It seems like it's the linux version which is out of date. It does update jq but even after updating it's still version 1.4 which is the one that doesn't work...
Setting up travis on my fork worked though, I like that :)
Any idea what else I could try @jtigger, @stkent?
Setting up travis on my fork worked though, I like that :)
Sweet! Yeah, always nice to have ways of shortening that feedback loop on changes. Being able to have a little personal "workspace" is great.
I'm digging into this a little bit, this morning. I learned:
jq available from the official package repo for the version of Linux Travis is running for the CI builds is version 1.2 (!?!?) :( :( :(jq just built, the first time on Travis' CI box!!! 馃帀 jq, we need to update the PATH environment variable to give _our_ version of tools preference. To update the PATH on Travis CI, you need to include a line in the before_script section.@FridaTveit, could you please review #309?
Great, thank you! It works! :D I did have a look at that section of https://stedolan.github.io/jq/download/ before, but I wasn't sure whether that was something we were allowed to do. But it all works now so happy days :D