【发布时间】:2018-08-24 13:07:58
【问题描述】:
我在 R 中使用testthat,如果在测试中生成警告,我希望 travis 使我的构建失败。我有warnings_are_errors: true,但似乎在测试中生成的警告不会传播到那个级别。有没有办法设置这个?这是一个 build,通过了该测试并带有警告:
test_that("warnings cause travis to fail", {
odd <- 1:2 * 1:5
expect_equal(length(odd), 5)
})
【问题讨论】:
-
您能否包含指向包含测试的确切分支和文件的链接?它没有出现在搜索中 because it's not in the master/default branch。
-
我想知道是否调用了函数/测试(尽管
tests/test-all.R看起来不错)。你能故意从那个函数中抛出一个错误,然后在 Travis 中查看检查是否失败? -
我认为有些东西断开了。 travis yaml 文件指定了一个作业矩阵,但我没有看到多个作业 associated with that commit。
-
@wibeasley -- 矩阵有问题,谢谢。现在已修复,但构建仍然通过。测试确实运行;这是一个在同一测试中失败并出现错误的构建:travis-ci.org/HealthCatalyst/healthcareai-r/builds/353046003