Skip to content

Commit

Permalink
✅ install git-lfs into Travis and fetch test data
Browse files Browse the repository at this point in the history
  • Loading branch information
caryan committed Apr 25, 2016
1 parent 90263a4 commit e797010
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ matrix:
- python: "2.7"
env: ATOM=1.0

before_install:
#install git lfs and fetch test data
- wget https://github.com/github/git-lfs/releases/download/v1.2.0/git-lfs-linux-amd64-1.2.0.tar.gz
- tar xzf git-lfs-linux-amd64-1.2.0.tar.gz
- (cd git-lfs-1.2.0 && PREFIX=$HOME/.local ./install.sh)
- export PATH=$HOME/.local/bin:$PATH
- git lfs fetch

install:
# Setup anaconda. See http://conda.pydata.org/docs/travis.html

Expand All @@ -40,12 +48,6 @@ install:
- if [[ $ATOM == 1.0 ]]; then pip install cppy; pip install git+https://github.com/nucleic/atom.git@1.0.0-dev; fi
- pip install watchdog coveralls

# download and extract test data
- if [[ $TRAVIS_PYTHON_VERSION = 2.7 ]]; then export TEST_DATA="https://drive.google.com/uc?export=download&id=0BxaPKTZqyVchaXc1V3hlejRaY2M"; fi
- if [[ $TRAVIS_PYTHON_VERSION = 3.5 ]]; then export TEST_DATA="https://drive.google.com/uc?export=download&id=0B2sNiahoh0BZSzNPakRSMWgzQW8"; fi
- wget $TEST_DATA -O test_data.tar.gz
- tar xzvf test_data.tar.gz -C tests/

script:
- coverage run -m unittest discover
after_script:
Expand Down

4 comments on commit e797010

@blakejohnson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@blakejohnson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the Travis log. It looks like git lfs successfully fetched the test data but then none of the tests were able to open the files...

@blakejohnson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, we also now need an alternate solution to the Python 2.7 vs 3.5 thing. I guess we can commit both versions to the repo and have the test script search an alternate location for 3.5? Even better, once we have that mechanism, we can have an alternate file only for the RB tests, which is where things break.

@caryan
Copy link
Contributor Author

@caryan caryan commented on e797010 Apr 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it took me a bit to figure it out but it's just like git fetch vs git pull. git lfs fetch just downloads the files but doesn't update the text pointer. It's fixed now and Travis is happy for 3.5 at least. I was thinking along you line of just having an _27 version of the RB files.

Please sign in to comment.