Skip to content

Commit

Permalink
Merge pull request #33 from brittonsmith/test
Browse files Browse the repository at this point in the history
Cache test answers and only generate if they don't exist.
  • Loading branch information
chummels committed Feb 21, 2018
2 parents 9e88ef6 + 6f43987 commit cc59c8c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ cache:
- $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853
- $YT_DIR
- $TRIDENT_ION_DATA
- $TRIDENT_ANSWER_DATA
pip: true

addons:
Expand Down Expand Up @@ -78,15 +79,18 @@ before_script:
script:
- |
export RUN_DOWNLOAD_TEST=0
# install gold standard and generate answers
# this uses the yt gold standard version
export RUN_DOWNLOAD_TEST=0
export TRIDENT_GENERATE_TEST_RESULTS=1
git checkout $TRIDENT_GOLD
pip install -e .
pushd tests
py.test
popd
# answers are cached, so don't generate if they already exist
if [ ! -f $TRIDENT_ANSWER_DATA/test_results/TRIDENT_VERSION ]; then
export TRIDENT_GENERATE_TEST_RESULTS=1
git checkout $TRIDENT_GOLD
pip install -e .
pushd tests
py.test
popd
fi
# gold-standard yt + trident tip
export TRIDENT_GENERATE_TEST_RESULTS=0
git checkout HEAD
Expand Down

0 comments on commit cc59c8c

Please sign in to comment.