【问题标题】:Travis: How to use variables configured through repo settings in builds triggered by forks?Travis:如何在由分叉触发的构建中使用通过 repo 设置配置的变量?
【发布时间】:2017-06-20 10:33:00
【问题描述】:

套件中的一些测试使用我通过 Travis 上的 repo 设置配置的凭据。尽管这些仅可用于从原始存储库中提取请求 - 而不是分叉(根据 documentation)。

即使来自分叉的拉取请求,我如何使这些测试通过?我必须跳过这些还是有其他解决方案?

谢谢

【问题讨论】:

    标签: testing github travis-ci test-environments


    【解决方案1】:

    我发现这也困扰着其他开发者https://github.com/travis-ci/travis-ci/issues/1946

    我想问题可以通过一些脚本来解决:

    if $secret_env.present?
      run_all_tests
    else
      run_tests_which_dont_require_secret_env
    end
    

    另一种解决方法可能是要求项目所有者向您提供用于设置分叉的凭据。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-22
      • 2015-09-07
      • 2013-06-15
      • 2019-01-23
      相关资源
      最近更新 更多