Run elm-review in CI
lydell opened this issue · comments
Hi!
I debugged this issue in ci.sh a little:
# elm-review tries to download elm-json, and it fails in CI. We'll try again
# in the 20.05 release of Nix, where it's packaged natively.
# elm-review
It turns out elm-json downloads just fine! It’s executing elm-json that fails. This is the command that elm-review executes:
elm-json solve --extra elm/json stil4m/elm-syntax elm/project-metadata-utils MartinSStewart/elm-serialize -- review/elm.json
Running that on its own in your CI setup results in:
phase: retrieve
Jan 22 18:15:41.748 WARN Failed to fetch versions from package.elm-lang.org
-- NO VALID PACKAGE VERSION ----------------------------------------------------
Because elm/json does not appear to exist and this project depends on elm/json
at any version, no valid set of package versions could be found.
Trying to curl
package.elm-lang.org results in:
curl https://package.elm-lang.org/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (77) error setting certificate verify locations: CAfile: /no-cert-file.crt CApath: none
I found this GitHub issue while googling, but I don’t understand if/what the solution is: NixOS/nixpkgs#13744
Hope this helps!
oh, classic. It's in a nix-shell --pure
so it can't get the system certs. The solution is probably to add the cacert
package to shell.nix.
yep, that did it! Thank you for pointing this out. How'd you get into an environment that had the problem to debug?
I forked your repo and repeatedly pushed to run in GitHub Actions: https://github.com/lydell/elm-csv/actions
Did some other coding / watched some YouTube while waiting 😄
wow, that sounds painful. Thank you for going through that to find the root cause!