forked from dasbus-project/dasbus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (27 loc) · 1.04 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
language: minimal
services: docker
sudo: required
env:
- DOCKER_FILE=".travis/Dockerfile.fedora-rawhide"
- DOCKER_FILE=".travis/Dockerfile.centos-latest"
before_install:
# Create a docker image called "myimage".
- docker build -t myimage -f "$DOCKER_FILE" .
before_script:
# Create a docker container from the image, mount the current working
# directory to /app inside the container and let the container running
# in the background. The resulting container ID will be saved to
# container_id so we can reference it later on.
- docker run --volume "$(pwd):/app" --workdir "/app" --tty --detach myimage bash > container_id
script:
# Run tests in the running container.
- docker exec "$(cat container_id)" make check
- docker exec "$(cat container_id)" make coverage
- docker exec "$(cat container_id)" make docs
after_success:
# Analyze the code coverage.
- docker exec "$(cat container_id)" coverage3 xml -i
- bash <(curl -s https://codecov.io/bash)
after_script:
# Stop the container.
- docker stop "$(cat container_id)"