You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

102 lines
3.2 KiB

  1. language: python
  2. sudo: false
  3. matrix:
  4. fast_finish: false
  5. os:
  6. - linux
  7. python:
  8. - '2.7'
  9. - '3.4'
  10. - '3.5'
  11. install:
  12. - pip -q --log dist/pip.log install --upgrade pip setuptools py
  13. - pip -q --log dist/pip.log install -r requirements.txt -r requirements-dev.txt
  14. - pip check
  15. script:
  16. - travis_wait python setup.py test
  17. - export PACKAGE_NAME=$(python setup.py --name)
  18. - export PACKAGE_VERSION=$(python setup.py --version)
  19. after_success:
  20. - python travis_after_all.py
  21. - export $(cat .to_export_back)
  22. - |
  23. if [ "$BUILD_LEADER" = "YES" ]; then
  24. if [ "$BUILD_AGGREGATE_STATUS" = "others_succeeded" ]; then
  25. echo "All jobs succeeded! PUBLISHING..."
  26. else
  27. echo "Some jobs failed"
  28. fi
  29. fi
  30. - coveralls
  31. - travis_wait python setup.py sdist bdist_wheel
  32. after_failure:
  33. - python travis_after_all.py
  34. - export $(cat .to_export_back)
  35. - |
  36. if [ "$BUILD_LEADER" = "YES" ]; then
  37. if [ "$BUILD_AGGREGATE_STATUS" = "others_failed" ]; then
  38. echo "All jobs failed"
  39. else
  40. echo "Some jobs failed"
  41. fi
  42. fi
  43. after_script:
  44. - echo leader=$BUILD_LEADER status=$BUILD_AGGREGATE_STATUS
  45. branches:
  46. only:
  47. - master
  48. - develop
  49. notifications:
  50. email:
  51. - pycontribs@googlegroups.com
  52. before_deploy:
  53. - echo "before deploy..."
  54. deploy:
  55. - provider: releases
  56. api_key:
  57. secure: gr9iOcQjdoAyUAim6FWKzJI9MBaJo9XKfGQGu7wdPXUFhg80Rp6GLJsowP+aU94NjXM1UQlVHDAy627WtjBlLH2SvmVEIIr7+UKBopBYuXG5jJ1m3wOZE+4f1Pqe9bqFc1DxgucqE8qF0sC24fIbNM2ToeyYrxrS6RoL2gRrX2I=
  58. file:
  59. - dist/$PACKAGE_NAME-$PACKAGE_VERSION*
  60. skip_cleanup: true
  61. on:
  62. tags: false
  63. branch: master
  64. condition: "$BUILD_LEADER = YES"
  65. - provider: pypi
  66. user: sorin
  67. password:
  68. secure: E0cjANF7SLBdYrsnWLK8X/xWznqkF0JrP/DVfDazPzUYH6ynFeneyofzNJQPLTLsqe1eKXhuUJ/Sbl+RHFB0ySo/j/7NfYd/9pm8hpUkGCvR09IwtvMLgWKp3k10NWab03o2GOkSJSrLvZofyZBGR40wwu2O9uXPCb2rvucCGbw=
  69. distributions: sdist bdist_wheel
  70. skip_cleanup: true
  71. on:
  72. condition: "$BUILD_LEADER = YES"
  73. condition: "$TRAVIS_TAG = ''"
  74. branch: master
  75. - provider: pypi
  76. server: https://testpypi.python.org/pypi
  77. user: sorins
  78. password:
  79. secure: E0cjANF7SLBdYrsnWLK8X/xWznqkF0JrP/DVfDazPzUYH6ynFeneyofzNJQPLTLsqe1eKXhuUJ/Sbl+RHFB0ySo/j/7NfYd/9pm8hpUkGCvR09IwtvMLgWKp3k10NWab03o2GOkSJSrLvZofyZBGR40wwu2O9uXPCb2rvucCGbw=
  80. distributions: sdist bdist_wheel
  81. skip_cleanup: true
  82. on:
  83. condition: "$BUILD_LEADER = YES"
  84. condition: "$TRAVIS_TAG = ''"
  85. branch: develop
  86. after_deploy:
  87. - echo "Now we only have tag the changeset and push..."
  88. - git tag $PACKAGE_VERSION -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER on $TRAVIS_BRANCH branch."
  89. - git push -q https://$TAGPERM@github.com/pycontribs/$PACKAGE_NAME $PACKAGE_VERSION
  90. addons:
  91. artifacts:
  92. debug: true
  93. paths:
  94. - dist/*
  95. target_paths: $PACKAGE_NAME/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER-$TRAVIS_PYTHON_VERSION
  96. working_dir: $TRAVIS_BUILD_DIR
  97. env:
  98. global:
  99. - secure: fuXwQL+KHQ96XkAFl2uQc8eK8dAjrgkup46tck/UGjVpdv1PT/yHmBKrvpFjDa50ueGbtBwTdKAwhyAmYuiZCk2IYHzdvBylCZBBji2FSpaTM59CVwgkVT6tx3HHO83X0mEX6ih9TJvZD5XhX+YUjopnseRXRq3ey3JZJXWN4RM=
  100. - secure: "pGQGM5YmHvOgaKihOyzb3k6bdqLQnZQ2OXO9QrfXlXwtop3zvZQi80Q+01l230x2psDWlwvqWTknAjAt1w463fYXPwpoSvKVCsLSSbjrf2l56nrDqnoir+n0CBy288+eIdaGEfzcxDiuULeKjlg08zrqjcjLjW0bDbBrlTXsb5U="
  101. - ARTIFACTS_BUCKET: pycontribs