|
| 1 | +conditions: v1 |
| 2 | + |
1 | 3 | language: python
|
2 |
| -python: |
3 |
| -- "3.5" |
4 |
| -- "3.6-dev" |
5 |
| -- "3.7-dev" |
6 |
| -- "nightly" |
7 | 4 |
|
8 | 5 | dist: trusty
|
9 | 6 | sudo: false
|
10 | 7 | cache: pip
|
11 | 8 |
|
12 | 9 | before_install:
|
13 | 10 | - pip install --upgrade flit
|
14 |
| -install: |
15 |
| -- pushd blurb |
16 |
| -- flit install |
17 |
| -- popd |
18 |
| -script: |
19 |
| -- blurb test |
20 | 11 |
|
21 | 12 | .mixtures:
|
| 13 | +- &run-if-tagged |
| 14 | + if: tag IS present |
| 15 | +- &run-if-cherry-picker |
| 16 | + if: tag =~ ^cherry\-picker\-v\d+\.\d+\.\d+$ |
| 17 | +- &run-if-blurb |
| 18 | + if: tag =~ ^blurb\-v\d+\.\d+\.\d+$ |
| 19 | +- &run-if-cherry-picker-or-untagged |
| 20 | + if: tag IS NOT present OR tag =~ ^cherry\-picker\-v\d+\.\d+\.\d+$ |
| 21 | +- &run-if-blurb-or-untagged |
| 22 | + if: tag IS NOT present OR tag =~ ^blurb\-v\d+\.\d+\.\d+$ |
22 | 23 | - &install-and-test-cherry-picker
|
| 24 | + <<: *run-if-cherry-picker-or-untagged |
| 25 | + env: |
| 26 | + TARGET_PKG: cherry_picker |
23 | 27 | install:
|
24 |
| - - pushd cherry_picker |
| 28 | + - &cd-to-project pushd "$TARGET_PKG" |
25 | 29 | - flit install
|
26 |
| - - popd |
27 | 30 | script:
|
28 |
| - - pushd cherry_picker |
29 | 31 | - pytest cherry_picker/test.py -v
|
30 | 32 | - popd
|
| 33 | +- &install-and-test-blurb |
| 34 | + <<: *run-if-blurb-or-untagged |
| 35 | + env: |
| 36 | + TARGET_PKG: blurb |
| 37 | + install: |
| 38 | + - *cd-to-project |
| 39 | + - flit install |
| 40 | + - popd |
| 41 | + script: |
| 42 | + - blurb test |
| 43 | +- &deploy-base |
| 44 | + stage: Publish dists to PYPI |
| 45 | + <<: *run-if-tagged |
| 46 | + python: "3.6-dev" |
| 47 | + install: |
| 48 | + - *cd-to-project |
| 49 | + script: |
| 50 | + - flit build |
| 51 | + before_deploy: |
| 52 | + # Add an empty setup.py stub, because pypi provider always calls it |
| 53 | + - touch setup.py |
| 54 | + deploy: &deployment-config |
| 55 | + provider: pypi |
| 56 | + # `skip-cleanup: true` is required to preserve binary wheel and sdist, |
| 57 | + # built by during `install` step above. |
| 58 | + skip-cleanup: true |
| 59 | + # `skip-existing: true` is required to skip uploading dists, already |
| 60 | + # present in PyPI instead of failing the whole process. |
| 61 | + # This happenes when other CI (AppVeyor etc.) has already uploaded |
| 62 | + # the very same dist (usually sdist). |
| 63 | + skip-existing: true |
| 64 | + user: &pypi-user core-workflow |
| 65 | + password: &pypi-password |
| 66 | + # Encrypt with `travis encrypt -r python/core-workflow --org` while using travis-ci.org; |
| 67 | + # change to `travis encrypt -r python/core-workflow --api-endpoint 'https://api.travis-ci.com/'` |
| 68 | + # upon switch to __free__ travis-ci.com: |
| 69 | + secure: "bg1ZOOHlhaT+S3TQy2WpSsWekHaeZSq39kkZj/Ql3nvJ0ES+a+lTjk+gmuSnSX0Sf9V+88TdN5g1frYVcvYWwIQvLEQP2xhqIfq8K+MVe+GbshQGiTD4PC4f7vRcDY+B93X7cQ8HgkGho3c0/BaEaK6MtrS8WK7dIdHCPaea5D8rLF9jXtS2Lt8MYtqRDG1R2BsNN+o87eyr3qD3aJW6cFRPTHPr/x+gmlKuIJcVOwuVd4xyR701xRpE7hK5/bKvQwI2QZhD7wTyJwYqsl3Ce/ZlyS+IINktkFhD2BqH2ya4tdOHeVhA+b44eJEDXUR7gweyO+Ein5W3S3R2lDxHuX3Aq7nJBKHxU39kwcnPPaMRWYKey51d9zbIicmxjj5sLY0vPYmlX1zdbDUK9NqkdRf8aLzyowWFl3DtkXmyoakITOz9boqDIRiivTJQ/mLG8AFKgf0ms/z1yW4/PN+LoomdpmhQj05EfAJdAvdTw+ceteaeBSKc2uDql4Qj5AKUddeaoLQuPbWForfSPosv9DZZmvOXrmncY91HngrdclxFIssMtefQrC2USbQEIedih1cxfsXzwBrX7+f4eHH2MJt/GrOyNB0gaXc4sikYkaBKsIg7UCWC1/F4jmGkyDLlwp31zflZkjPKUJ3vp2SC9R6sHcT04tvxTVIMDCJgkc8=" |
| 70 | + on: |
| 71 | + tags: true |
| 72 | + all_branches: true |
| 73 | + |
31 | 74 | jobs:
|
32 | 75 | include:
|
| 76 | + - python: "3.5" |
| 77 | + <<: *install-and-test-blurb |
| 78 | + - python: "3.6-dev" |
| 79 | + <<: *install-and-test-blurb |
| 80 | + - python: "3.7-dev" |
| 81 | + <<: *install-and-test-blurb |
| 82 | + - python: "nightly" |
| 83 | + <<: *install-and-test-blurb |
| 84 | + |
33 | 85 | - python: "3.6-dev"
|
34 | 86 | <<: *install-and-test-cherry-picker
|
35 | 87 | - python: "3.7-dev"
|
36 | 88 | <<: *install-and-test-cherry-picker
|
37 | 89 | - python: "nightly"
|
38 | 90 | <<: *install-and-test-cherry-picker
|
| 91 | + |
| 92 | + - <<: *deploy-base |
| 93 | + <<: *run-if-cherry-picker |
| 94 | + env: |
| 95 | + TARGET_PKG: cherry_picker |
| 96 | + |
| 97 | + - <<: *deploy-base |
| 98 | + <<: *run-if-blurb |
| 99 | + if: false |
| 100 | + env: |
| 101 | + TARGET_PKG: blurb |
0 commit comments