-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (52 loc) · 1.81 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
os: linux
dist: bionic
language: python
services:
- docker
before_install:
- pip -q install -U docker-compose
_iot-simulator: &iot-simulator
stage: simulator
install:
- docker-compose -f docker/docker-compose.yml pull
- docker-compose -f docker/docker-compose.yml build
before_script:
- docker-compose -f docker/docker-compose.yml -f docker/edge/docker-compose.edge.yml up -d
- sleep 30 # warm-up
- DOCKER_HOST='127.0.0.1:22375' docker-compose -f docker/edge/docker-compose.modules.yml pull
- DOCKER_HOST='127.0.0.1:22375' docker-compose -f docker/edge/docker-compose.modules.yml build
script:
- sleep 5 # warm-up
- sed -i 's/# IOT_SERIAL/IOT_SERIAL/g' docker/edge/docker-compose.modules.yml
- DOCKER_HOST='127.0.0.1:22375' docker-compose -f docker/edge/docker-compose.modules.yml up -d
- sleep 30 # collect some telemetry
- curl -sf http://localhost/telemetry/${IOT_TL}1234/last/
jobs:
include:
- stage: build
before_script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
script:
- docker-compose -f docker/docker-compose.yml build
- docker push daniviga/bite
- docker push daniviga/ntpd
if: branch = master
- stage: django
install:
- docker-compose -f docker/docker-compose.yml pull
- docker-compose -f docker/docker-compose.yml build
before_script:
- docker-compose -f docker/docker-compose.yml up -d
script:
- docker-compose -f docker/docker-compose.yml exec bite python manage.py test
- stage: django
install:
- pip3 -q install flake8
script:
- flake8 bite --exclude migrations,settings.py
- <<: *iot-simulator
env: IOT_TL=http
- <<: *iot-simulator
env: IOT_TL=mqtt
- <<: *iot-simulator
env: IOT_TL=ws