Travis CI build fails "testthat unit tests failed"; same test passes local test/check

Failing build for Github repo ukbtools.

The test, in tests/testthat/test-dataset.R, accesses data from inst/extdata with system.file and passes the returned path to a package function:

path_to_example_data <- system.file("extdata", package = "ukbtools")
ukbtools::ukb_df_field("ukbxxxx", path = path_to_example_data)

ukbtools::ukb_df_field calls xml2::read_html.default(file.path(path, "ukbxxxx.html")) which generates an invalid path on Travis CI (trusty/ xenial).

‘/home/travis/build/kenhanscombe/ukbtools/ukbtools.Rcheck/ukbtools/extdata/ukbxxxx.html’ does not exist.

The same test passess locally, sessionInfo

R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

Linux filesystems are case sensitive, the macOS filesystem is (by default) not. Your files are actually called ukbXXXX, with capital X’s.

Thank you @jimhester. Git no longer tracking these files! I can’t git add the files in inst/extdata/ (–force doesn’t work). Last commit 8 Jan 2019. I’ve renamed the one incorrectly labelled local file and touched other 2 to register change but no joy.

Contents of .gitignore:

Meta
.Rproj.user
.Rhistory
.RData
.Ruserdata
ukbtools.Rproj

Fixed. I had to completely remove the directory, commit, then replace the directory, to be able to add and commit.