-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (41 loc) · 972 Bytes
/
.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
group: edge
sudo: required
dist: trusty
services:
- docker
language: python
python:
- "2.7"
- "3.2"
env:
global:
- COMMIT=${TRAVIS_COMMIT::8}
- REPO=laurelmcintyre/python-ci
addons:
sonarcloud:
organization: "laurelmcintyre-github"
before_install:
- docker build -t $REPO:$COMMIT -t $REPO:latest .
install:
- sudo -H pip install nose2 nose2-cov
- sudo -H pip install codecov
script:
- nose2 --with-coverage main
- coverage run main.py 4
- codecov
- sonar-scanner
- docker run -it $REPO:$COMMIT /bin/bash -c "cd python-ci"
after_success: |
if [ -n "$GITHUB" ]; then
cd "$TRAVIS_BUILD_DIR"
pydoc -w $TRAVIS_BUILD_DIR
mkdir docs
mv *.html docs/.
cd docs
cp ../README.md .
git init
git checkout -b gh-pages
git add .
git -c user.name='travis' -c user.email='travis' commit -m init
git push -f https://laurelmcintyre:[email protected]/laurelmcintyre/python-ci gh-pages
fi