virocon-organization / viroconweb

A software to compute environmental contours. Django web-application package.
MIT License
2 stars 1 forks source link

Tests fail for pull requests from forks #183

Open ahaselsteiner opened 6 years ago

ahaselsteiner commented 6 years ago

I'm submitting a ...

Expected behavior

How should it work (with the bug fixed or the feature implemented)? Tests should succeed even if a pull request is coming from a fork. Screenshot image

Actual behavior

How does it currently work (with the bug causing problems or without the feature)? At the moment the tests fail if a pull request was created by a fork becuase then AWS_ACCESS_KEY_ID, which is an encrypted environment variable, is not set. This is due to travis security settings: https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions a possible solution is to check if this pull request comes from a fork by adding something like

script:
   - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ?????set RUN_MODE='local-dev'

to .travis.yml When RUN_MODE is set to 'local-dev' it does not use AWS, but saves the files in the local directory instead.

Screenshot image

image

image

Steps to reproduce the problem (how to see the actual behavior)

  1. Fork viroconweb
  2. Craete a feature branch and make a change
  3. File a pull request and see how the tests will fail