This repository has been archived by the owner on Sep 15, 2023. It is now read-only.
forked from codalab/codalab-worksheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
36 lines (36 loc) · 1.52 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
language: python
sudo: required
services:
- docker
env:
- CODALAB_USERNAME=codalab CODALAB_PASSWORD=testpassword
python:
- "2.7"
before_install:
- docker --version
install:
- "pip install sqlalchemy"
# add packages required by tests (mock and nose are on Travis VM by default)
- "pip install pyyaml psutil"
- sudo apt-get update
- sudo apt-get install -y sshpass python-virtualenv
- sudo apt-get install -y libmysqlclient-dev
- ./setup.sh server
- ./venv/bin/pip install --upgrade setuptools
- ./venv/bin/pip install --upgrade pip
script:
- mysql -e "CREATE DATABASE codalab_bundles;"
- ./codalab/bin/cl config server/engine_url mysql://root@localhost:3306/codalab_bundles
- ./codalab/bin/cl config cli/default_address http://localhost:2900
- ./codalab/bin/cl config workers/default_docker_image ubuntu:14.04
- ./scripts/create-root-user.py $CODALAB_PASSWORD
- ./codalab/bin/cl server &
- ./codalab/bin/cl bundle-manager &
- printf "$CODALAB_USERNAME\n$CODALAB_PASSWORD\n" > /home/travis/.codalab/root.password
- chmod 600 /home/travis/.codalab/root.password
- sleep 15
- ./worker/codalabworker/worker.sh --server http://127.0.0.1:2900 --work-dir /home/travis/.codalab/worker-scratch --password-file /home/travis/.codalab/root.password --verbose &
- printf "$CODALAB_USERNAME\n$CODALAB_PASSWORD\n" | sshpass -p "" ./codalab/bin/cl work
- ./codalab/bin/cl upload -c stuff
- printf "$CODALAB_USERNAME\n$CODALAB_PASSWORD\n" | sshpass -p "" ./codalab/bin/cl rm ^
- ./venv/bin/python test-cli.py default