grinnellm / SpawnIndex

:fish: :egg: Calculate the Pacific Herring spawn index
MIT License
0 stars 2 forks source link

GitHub Actions fails on "test-coverage"; error re "gfiscamutils" and "glue" #31

Closed grinnellm closed 3 years ago

grinnellm commented 3 years ago

Error during the "Install dependencies" step:

package 'glue' successfully unpacked and MD5 sums checked
Error: Error: Failed to install 'gfiscamutils' from GitHub:
  (converted from warning) cannot remove prior installation of package 'glue'
Execution halted
Error: Process completed with exit code 1.

https://github.com/grinnellm/SpawnIndex/runs/1664024898

cgrandin commented 3 years ago

Make sure gfiscamutils is building correctly.. maybe it's broken Also there's probably a way to stop warnings from becoming errors on Actions

grinnellm commented 3 years ago

It builds correctly locally, on my machine.

cgrandin commented 3 years ago

I don't know if it matters but I put my Remotes section after Depends and Suggests in DESCRIPTION file

grinnellm commented 3 years ago

I re-arranged my DESCTIPTION file but I still get the same error.

andrew-edwards commented 3 years ago
  1. So does it start from a fresh computer, like Travis does? The link you provided says it has no cached R packages, so is installing them.
  2. If so then it seems to have installed glue, but then tries to install it again but can't because it's locked? Bit hard to search the output on the link to see how many times glue shows up. It's installing a lot of packages (which is generally getting to be a problem I'm finding, with all these dependencies). I thought that glue (whatever it does!) might be causing mine to fail now on Travis, but I have two packages with: image

This is all useful for me to understand before making the switch to GitHub Actions. Seems like it wouldn't fix my Travis issues anyway....

cgrandin commented 3 years ago

Maybe put gfiscamutils first on the Imports list in Description file

grinnellm commented 3 years ago

I really appreciate the suggestions. I tried importing gfiscamutils first but I get the same error: https://github.com/grinnellm/SpawnIndex/runs/1711267895

cgrandin commented 3 years ago

Look in the R-CMD-check.yaml file and change this line to true: R_REMOTES_NO_ERRORS_FROM_WARNINGS: false

This has to be it..

cgrandin commented 3 years ago

Side note, you can avoid having a seperate test coverage file by just adding this on the bottom of R-CMD-check.yaml:

    - name: Test coverage
        run: covr::codecov()
        shell: Rscript {0}

I'm just comparing with hake MSE one: https://github.com/pacific-hake/pacifichakemse/blob/master/.github/workflows/R-CMD-check.yaml

grinnellm commented 3 years ago

Oh, it was true already -- I accidentally set it to false but then reverted it.

grinnellm commented 3 years ago

That worked, thanks @cgrandin! I added the line R_REMOTES_NO_ERRORS_FROM_WARNINGS: true to the file "test-coverage.yaml" here and it worked just fine. Only 0.67% coverage so far though!