@@ -2,41 +2,38 @@ language: python
22
33cache : pip
44
5- python :
6- # - "2.6"
7- - " 2.7"
8- # - "3.2"
9- # - "3.3"
10- # - "3.4"
11- - " 3.5"
12- # - "3.5-dev" # 3.5 development branch
13- - " 3.6"
14- # - "3.6-dev" # 3.6 development branch
15- # - "3.7"
16- # - "3.7-dev" # 3.7 development branch
17- # - "nightly" # currently points to 3.7-dev
18- # PyPy versions
19- # - "pypy" # PyPy2 2.5.0
20- # - "pypy3" # Pypy3 2.4.0
21- # - "pypy-5.3.1"
22- #
5+ matrix :
6+ fast_finish : true
7+ include :
8+ # - python: 2.6
9+ - python : 2.7
10+ # - python: 3.3
11+ # - python: 3.4
12+ - python : 3.5
13+ - python : 3.6
14+ - python : 3.7
15+ dist : xenial
16+ sudo : true
2317
2418env :
2519 global :
2620 - GH_REF : git@github.com:smarie/python-yamlable.git
2721
2822before_install :
23+ # (a) linux dependencies
2924 - sudo apt-get install pandoc
3025 - sudo apt-get install ant
3126 - sudo apt-get install ant-optional
3227
3328install :
34- - pip install -r ci_tools/requirements-setup.txt
35- - pip install -r ci_tools/requirements-test.txt
36- - pip install -r ci_tools/requirements-report.txt
37- - pip install -r ci_tools/requirements-doc.txt
38- - pip install codecov # https://github.com/codecov/example-python. This is specific to travis integration
39- # - pip install coveralls # this is an alternative to codecov
29+ - pip list
30+ # needs to be installed beforehand
31+ - pip install setuptools_scm
32+ - python ci_tools/py_install.py pip ci_tools/requirements-pip.txt
33+ # travis-specific installs
34+ - pip install PyGithub # for ci_tools/github_release.py
35+ - pip install codecov # See https://github.com/codecov/example-python.
36+ - pip list
4037
4138script :
4239# - coverage run tests.py
@@ -48,14 +45,14 @@ script:
4845# now done in a dedicated script to capture exit code 1 and transform it to 0
4946 - chmod a+x ./ci_tools/run_tests.sh
5047 - sh ./ci_tools/run_tests.sh
48+ - python ci_tools/generate-junit-badge.py 100 # generates the badge for the test results and fail build if less than x%
5149
5250after_success :
5351# ***reporting***
5452# - junit2html junit.xml testrun.html output is really not nice
5553 - ant -f ci_tools/generate-junit-html.xml # generates the html for the test results. Actually we dont use it anymore
56- - python ci_tools/generate-junit-badge.py # generates the badge for the test results
5754 - codecov
58- - pylint yamlable # note that at the moment the report is simply lost, we dont transform the result into anything
55+ # - pylint yamlable # note that at the moment the report is simply lost, we dont transform the result into anything
5956# ***documentation***
6057 - mkdocs build -f docs/mkdocs.yml
6158 - mv reports/junit site/
@@ -67,11 +64,11 @@ after_success:
6764 if [ -s "ci_tools/github_travis_rsa" ]; then
6865 chmod 600 ci_tools/github_travis_rsa
6966 eval `ssh-agent -s` # launch the authentication agent
70- ssh-add ci_tools/github_travis_rsa # register the key
67+ ssh-add ci_tools/github_travis_rsa # register the decrypted key
7168 git config user.name "Automatic Publish"
7269 git config user.email "sylvain.marie@schneider-electric.com"
7370 git remote add gh-remote "${GH_REF}";
74- git fetch gh-remote && git fetch gh-remote gh-pages:gh-pages;
71+ git fetch gh-remote && git fetch gh-remote gh-pages:gh-pages; # make sure we have the latest gh-remote
7572 # push but only if this is not a build triggered by a pull request
7673 # note: here we use the --dirty flag so that mkdocs does not clean the additional reports that we copied in the site
7774 if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_PYTHON_VERSION}" = "3.5" ]; then echo "Pushing to github"; PYTHONPATH=yamlable/ mkdocs gh-deploy -v --dirty -f docs/mkdocs.yml --remote-name gh-remote; git push gh-remote gh-pages; fi;
@@ -80,18 +77,24 @@ after_success:
8077 fi
8178
8279deploy :
83- provider : pypi
84- user : " smarie"
85- password :
86- secure : " TLBvYaFRplEFa8T0AW5b0LnRnz19/k/BEjtiiw4aWWrXTfNiWW1RRREG1iqqsqa6rkv547BVug2zj0SeeLvoncjGYclh92bmKMFhLVOlJtmYCIp8pNXT/3fEtrZosUN2OX4Z6qfOWnnefwjBB19rl18XPq/6zTyZ9dwKjkAfN+PPkHLqPtQ22+TcUe7f9jkDOs1pR0afacHz3HuBE5iaWbcDD2yCteJbfHwpFExfyO/X6LcjtQu63KH2NGvFP9qvwGrtnDIvmc1sWW9zi85H/j9T1TLQovJrY0oS8F+QOXbFlz/mOpORnh2sUj3f/nye0CvutnAqgS2OcRMqEAMIrdWzQOu8aBkKQuTOtiP+YKv7q7+GbWDIHJZK+whCWscS6XORVIaP5yGHc6SNZQqXarYskJFuRyJoClL51SxNsUzN4+yOLsdAqI/lvK2jIx4c2IztxuHEmbNwg1/R5/3YTk8g48U/nqOuIWBTNr0YwRRL/lBCxzGfHSjfcEnxzB0h/ORn0wBXig6tmNRyFAeA3qMHRekUgHjmzdZWw1yty3j1+sxdhOJXge+/AvqnNhSdY06w12WhEi4MV7p2pS5ZMX3Wnxvla/AzkCM4hrXxTYycAgFYjU2WkCCYqJwfV+Noa2hDbKPMHucoYBfB+qYNHUu0f+5uEGY3V5EhxZCmrGE="
87- on :
88- tags : true
89- python : 3.5 # only one of the builds have to be deployed
90- # server: https://test.pypi.org/legacy/
91- distributions : " sdist bdist_wheel"
80+ # Deploy on PyPI on tags
81+ - provider : pypi
82+ user : " smarie"
83+ password :
84+ secure : " TLBvYaFRplEFa8T0AW5b0LnRnz19/k/BEjtiiw4aWWrXTfNiWW1RRREG1iqqsqa6rkv547BVug2zj0SeeLvoncjGYclh92bmKMFhLVOlJtmYCIp8pNXT/3fEtrZosUN2OX4Z6qfOWnnefwjBB19rl18XPq/6zTyZ9dwKjkAfN+PPkHLqPtQ22+TcUe7f9jkDOs1pR0afacHz3HuBE5iaWbcDD2yCteJbfHwpFExfyO/X6LcjtQu63KH2NGvFP9qvwGrtnDIvmc1sWW9zi85H/j9T1TLQovJrY0oS8F+QOXbFlz/mOpORnh2sUj3f/nye0CvutnAqgS2OcRMqEAMIrdWzQOu8aBkKQuTOtiP+YKv7q7+GbWDIHJZK+whCWscS6XORVIaP5yGHc6SNZQqXarYskJFuRyJoClL51SxNsUzN4+yOLsdAqI/lvK2jIx4c2IztxuHEmbNwg1/R5/3YTk8g48U/nqOuIWBTNr0YwRRL/lBCxzGfHSjfcEnxzB0h/ORn0wBXig6tmNRyFAeA3qMHRekUgHjmzdZWw1yty3j1+sxdhOJXge+/AvqnNhSdY06w12WhEi4MV7p2pS5ZMX3Wnxvla/AzkCM4hrXxTYycAgFYjU2WkCCYqJwfV+Noa2hDbKPMHucoYBfB+qYNHUu0f+5uEGY3V5EhxZCmrGE="
85+ on :
86+ tags : true
87+ python : 3.5 # only one of the builds have to be deployed
88+ # server: https://test.pypi.org/legacy/
89+ distributions : " sdist bdist_wheel"
9290
93- matrix :
94- fast_finish : true
91+ # Create a github release on tags
92+ - provider : script
93+ script : python ci_tools/github_release.py -s $GITHUB_TOKEN --repo-slug smarie/python-yamlable -cf ./docs/changelog.md -d https://smarie.github.io/python-yamlable/changelog/ $TRAVIS_TAG
94+ skip_cleanup : true
95+ on :
96+ tags : true
97+ python : 3.5 # only one of the builds have to be deployed
9598
9699notifications :
97100 email :
0 commit comments