forked from kihiukiragu/pytraccar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
35 lines (29 loc) · 893 Bytes
/
.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
sudo: required
dist: xenial
language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
- nightly
before_install:
- sudo apt-get update -qq
# Creates and starts a local traccar server. Waits a few seconds to ensure complete loading.
- wget https://github.com/traccar/traccar/releases/download/v4.2/traccar-linux-64-4.2.zip
- unzip traccar-linux-64-4.2.zip
- sudo ./traccar.run
- cd /opt/traccar/
- sudo service traccar start
- sleep 10
- cd $TRAVIS_BUILD_DIR/tests
# set a token for admin account
- "curl -i '127.0.0.1:8082/api/users/1' -X PUT -u 'admin:admin' -H 'Content-Type: application/json' -d $(<admin.json)"
# create a standard user
- "curl -i '127.0.0.1:8082/api/users' -X POST -u 'admin:admin' -H 'Content-Type: application/json' -d $(<user.json)"
install:
- cd $TRAVIS_BUILD_DIR
- pip install -r requirements.txt
script:
- python -m pytest