1
0
mirror of https://github.com/daniviga/bite.git synced 2024-12-24 09:11:25 +01:00
bite/.travis.yml

57 lines
1.8 KiB
YAML
Raw Normal View History

os: linux
dist: bionic
language: python
services:
- docker
before_install:
- pip -q install -U docker-compose
_iot-simulator: &iot-simulator
stage: simulator
install:
2021-10-09 23:21:30 +02:00
- docker-compose -f docker/docker-compose.yml pull -q
- 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
2021-03-19 13:56:28 +01:00
- sleep 30 # warm-up
2021-10-09 23:21:30 +02:00
- DOCKER_HOST='127.0.0.1:22375' docker-compose -f docker/edge/docker-compose.modules.yml pull -q
- DOCKER_HOST='127.0.0.1:22375' docker-compose -f docker/edge/docker-compose.modules.yml build
script:
2021-03-19 13:56:28 +01:00
- 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:
2021-10-09 23:21:30 +02:00
- docker-compose -f docker/docker-compose.yml pull -q
- 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