rOpenGov / pxweb

R tools to access PX-WEB API
http://ropengov.github.io/pxweb
Other
69 stars 31 forks source link

Travis-CI to Github Actions #212

Closed pitkant closed 3 years ago

pitkant commented 3 years ago

Change CI platform from Travis to GitHub Actions, as described in the linked issue

Close #211

MansMeg commented 3 years ago

This looks good, but there is a test that fails. Can you check: FAILURE (test-pxweb_get.R:65:5): Previous bugs ? to see what the error is?

antagomir commented 3 years ago

Seems to be this one - I am not sure what's the purpose of it.

test_that(desc="Previous bugs",{
  # CRAN seem to run tests in parallel, hence API tests cannot be run on CRAN.
  skip_on_cran()

  # This is a bug in the previous implementation of pxweb
  url <- "http://bank.stat.gl/api/v1/en/Greenland/BE/BE01"
  tryr <- try(httr::GET(url), silent = TRUE)
  if(!inherits(tryr, "try-error")){
    expect_silent(px_meta_data <- pxweb_get(url))
    expect_output(print(px_meta_data), regexp = "PXWEB LEVELS")
  }

})  
pitkant commented 3 years ago

The test seems to have failed because pxweb url has changed from http to https form, which produced the following warning message, making the test fail since the test was obviously not silent:

url <- "http://bank.stat.gl/api/v1/en/Greenland/BE/BE01"
px_meta_data <- pxweb_get(url)
Warning message:
PXWEB URL CHANGE:
 from: http://bank.stat.gl/api/v1/en/Greenland/BE/BE01
 to:   https://bank.stat.gl/api/v1/en/Greenland/BE/BE01

I can push a fix to this by replacing the old http url with a new https url, since it seems to me that the purpose of this test was not to replicate bugs... or was it? Could expect_warning would be more appropriate than expect_silent?

MansMeg commented 3 years ago

Ah, yes. Just fix that and I think we are all home.

pitkant commented 3 years ago

I guess Appveyor checks can be disabled by removing Appveyor (and Travis CI) web hooks from Settings - Webhooks. They do not function as I removed the .yml files

MansMeg commented 3 years ago

Yes. Now fixed! Great work!