| 1 | version: 2.1 |
| 2 | |
| 3 | orbs: |
| 4 | python: cjw296/[email protected] |
| 5 | |
| 6 | jobs: |
| 7 | coverage: |
| 8 | docker: |
| 9 | - image: circleci/python:3.8 |
| 10 | steps: |
| 11 | - checkout |
| 12 | - attach_workspace: |
| 13 | at: coverage_output |
| 14 | - run: |
| 15 | name: "Check coverage" |
| 16 | command: | |
| 17 | sudo pip install coverage |
| 18 | coverage combine coverage_output/ |
| 19 | bash <(curl -s https://codecov.io/bash) |
| 20 | |
| 21 | check-package: |
| 22 | parameters: |
| 23 | image: |
| 24 | type: string |
| 25 | docker: |
| 26 | - image: << parameters.image >> |
| 27 | steps: |
| 28 | - python/check-package: |
| 29 | package: "xlrd" |
| 30 | test: |
| 31 | - run: |
| 32 | name: "Check Import" |
| 33 | command: python -c "import xlrd" |
| 34 | - run: |
| 35 | name: "Check no XLS in wheel" |
| 36 | command: "! unzip -l dist/*.whl | egrep '.xlsx?$'" |
| 37 | - run: |
| 38 | name: "Check no XLS in source dist" |
| 39 | command: "! tar tzf dist/*.tar.gz | egrep '.xlsx?$'" |
| 40 | |
| 41 | common: &common |
| 42 | jobs: |
| 43 | |
| 44 | - python/pip-run-tests: |
| 45 | matrix: |
| 46 | parameters: |
| 47 | image: |
| 48 | - circleci/python:2.7 |
| 49 | - circleci/python:3.6 |
| 50 | - circleci/python:3.9 |
| 51 | |
| 52 | - coverage: |
| 53 | name: coverage |
| 54 | requires: |
| 55 | - python/pip-run-tests |
| 56 | |
| 57 | - python/pip-docs: |
| 58 | name: docs |
| 59 | requires: |
| 60 | - coverage |
| 61 | |
| 62 | - python/pip-setuptools-build-package: |
| 63 | name: package |
| 64 | requires: |
| 65 | - docs |
| 66 | filters: |
| 67 | branches: |
| 68 | only: master |
| 69 | |
| 70 | - check-package: |
| 71 | matrix: |
| 72 | parameters: |
| 73 | image: |
| 74 | - circleci/python:2.7 |
| 75 | - circleci/python:3.9 |
| 76 | requires: |
| 77 | - package |
| 78 | |
| 79 | - python/release: |
| 80 | name: release |
| 81 | config: .carthorse.yml |
| 82 | requires: |
| 83 | - check-package |
| 84 | filters: |
| 85 | branches: |
| 86 | only: master |
| 87 | |
| 88 | workflows: |
| 89 | push: |
| 90 | <<: *common |
| 91 | periodic: |
| 92 | <<: *common |
| 93 | triggers: |
| 94 | - schedule: |
| 95 | cron: "0 0 11 * *" |
| 96 | filters: |
| 97 | branches: |
| 98 | only: master |