Skip to content

Commit

Permalink
Add automated rclone install
Browse files Browse the repository at this point in the history
  • Loading branch information
jfischer committed Mar 31, 2019
1 parent f3d9885 commit 1b076ce
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ install:
- pip install mypy
script:
- pip install --editable `pwd`
- cd tests; make test
- cd tests; make install-rclone-deb test
22 changes: 19 additions & 3 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DATAWORKSPACES:=$(shell cd ../dataworkspaces; pwd)

help:
@echo targets are: test clean mypy help
@echo targets are: test clean mypy help install-rclone-deb

UNIT_TESTS=test_git_utils test_move_results test_api test_git_fat_integration test_lineage_utils test_lineage test_snapshots

Expand All @@ -17,7 +17,23 @@ mypy:
cd $(DATAWORKSPACES)/utils; mypy --ignore-missing-imports $(MYPY_UTILS); \
cd $(DATAWORKSPACES); mypy --ignore-missing-imports $(MYPY_APIS)

RCLONE_VERSION=v1.46
RCLONE_FILE=rclone-$(RCLONE_VERSION)-linux-amd64.deb
RCLONE_CONFIG=~/.config/rclone/rclone.conf
# install rclone for travis-ci
install-rclone-deb: $(RCLONE_FILE) $(RCLONE_CONFIG)
sudo apt install -y ./$(RCLONE_FILE)

$(RCLONE_FILE):
curl --output $(RCLONE_FILE) https://downloads.rclone.org/$(RCLONE_VERSION)/$(RCLONE_FILE)

$(RCLONE_CONFIG):
mkdir -p ~/.config/rclone
echo "[localfs]" >$(RCLONE_CONFIG)
echo "type = local" >>$(RCLONE_CONFIG)
echo "nounce =" >>$(RCLONE_CONFIG)

clean:
rm -rf ./test ./remotes ./clones
rm -rf ./test ./remotes ./clones rclone*.deb

.PHONY: test help clean mypy
.PHONY: test help clean mypy install-rclone-deb

0 comments on commit 1b076ce

Please sign in to comment.