-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (37 loc) · 1.29 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
#
# Author : Francesco Seccamonte
# Copyright (c) 2020 Francesco Seccamonte. All rights reserved.
# Licensed under the MIT License. See LICENSE file in the project root for full license information.
#
os: linux
language: minimal
services:
- docker
addons:
apt:
packages:
# Update docker version
- docker-ce
env:
# used to setup a build matrix
- PYTHONVERSION=latest
- PYTHONVERSION=3.6
before_install:
# setup environmental variables needed by Codecov in Docker
- CI_ENV_CODECOV=`bash <(curl -s https://codecov.io/env)`
# Pull image
- docker pull python:$PYTHONVERSION
# Start container
- docker run -itd --name python$PYTHONVERSION $CI_ENV_CODECOV -v $TRAVIS_BUILD_DIR:/home/repo python:$PYTHONVERSION
# Print python version
- docker exec python$PYTHONVERSION python3 --version
script:
- docker exec -w /home/repo python$PYTHONVERSION python3 setup.py develop
- docker exec -w /home/repo python$PYTHONVERSION python3 -m unittest discover -v
after_success:
# Install coverage related tools
- docker exec python$PYTHONVERSION pip3 install coverage codecov
# Compute Code Coverage
- docker exec -w /home/repo python$PYTHONVERSION coverage run -m unittest discover
# Upload Coverage report to Codecov
- docker exec -w /home/repo python$PYTHONVERSION codecov