forked from labgrid-project/labgrid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (57 loc) · 1.91 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
57
58
language: python
dist: bionic
addons:
apt:
packages:
libow-dev
openssh-server
openssh-client
env:
global:
- CURRENT_UID=$(id -u):$(id -g)
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
before_install:
- ssh-keygen -f ~/.ssh/id_ed25519.local -t ed25519 -N ""
- cat ~/.ssh/id_ed25519.local.pub > ~/.ssh/authorized_keys
- echo -e "Host localhost ip6-localhost\n Hostname 127.0.0.1\n IdentityFile ~/.ssh/id_ed25519.local\n UserKnownHostsFile ~/.ssh/known_hosts.local" > ~/.ssh/config
- ssh -o StrictHostKeyChecking=no localhost echo OK
install:
- pip install -r travis-requirements.txt
- sudo mkdir /var/cache/labgrid && sudo chmod 1775 /var/cache/labgrid && sudo chown root:travis /var/cache/labgrid
script:
- pip install -e .
- pytest --cov-config .coveragerc --cov=labgrid --local-sshmanager --ssh-username travis
- python setup.py build_sphinx
- make -C man all
- git --no-pager diff --exit-code
after_success:
- codecov
matrix:
include:
- stage: docker
services:
- docker
script:
- ./docker/build.sh
- docker-compose -f docker/staging/docker-compose.yml up --exit-code-from client client
- docker-compose -f docker/staging/docker-compose.yml down
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$DOCKER_USERNAME" != "" ] && [ "$DOCKER_TOKEN" != "" ]; then
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin;
docker images;
docker tag labgrid-client labgrid/client;
docker tag labgrid-exporter labgrid/exporter;
docker tag labgrid-coordinator labgrid/coordinator;
docker push labgrid/client;
docker push labgrid/exporter;
docker push labgrid/coordinator;
fi
- stage: optional
python: "nightly"
- stage: optional
python: "3.9"
allow_failures:
- stage: optional