testinggithubtravis-citest-environments

Travis: How to use variables configured through repo settings in builds triggered by forks?


Some tests from suite use credentials which I've configured through repo settings on Travis. Although these are available only to pull requests from original repos - not forks (according to documentation).

How do I make those tests pass even on pull requests from forks? Do I have to skip those or there's some other solution?

Thanks


Solution

  • I see this is something that bothers other developers too https://github.com/travis-ci/travis-ci/issues/1946

    I guess problem could be solved with some scripting:

    if $secret_env.present?
      run_all_tests
    else
      run_tests_which_dont_require_secret_env
    end
    

    Another workaround could be to ask project owner to provide you with credentials you would use to setup your fork.