|
| 1 | +# Use the latest 2.1 version of CircleCI pipeline process engine. |
| 2 | +version: 2.1 |
| 3 | + |
| 4 | +orbs: |
| 5 | + python: circleci/[email protected] |
| 6 | + |
| 7 | +commands: |
| 8 | + setup_dependencies: |
| 9 | + description: "Install depenencies" |
| 10 | + parameters: |
| 11 | + after-deps: |
| 12 | + description: "Install dependenceis" |
| 13 | + type: steps |
| 14 | + default: [] |
| 15 | + steps: |
| 16 | + - run: |
| 17 | + name: "Install open JDK" |
| 18 | + command: sudo add-apt-repository -y ppa:openjdk-r/ppa |
| 19 | + - run: |
| 20 | + name: "Install qq" |
| 21 | + command: sudo apt-get -qq update |
| 22 | + - run: |
| 23 | + name: "No install recommends for JDK" |
| 24 | + command: sudo apt-get install -y openjdk-8-jdk --no-install-recommends |
| 25 | + - run: |
| 26 | + name: "Run Java Alternatives install for JDK" |
| 27 | + command: sudo update-java-alternatives -s java-1.8.0-openjdk-amd64 |
| 28 | + - run: |
| 29 | + name: "Run pip install setup tools and wheel" |
| 30 | + command: pip install -U pip setuptools wheel |
| 31 | + - run: |
| 32 | + name: "Install Tox" |
| 33 | + command: pip install -U tox==3.12.0 |
| 34 | + - run: |
| 35 | + name: "Install Code Cov" |
| 36 | + command: pip install -U codecov |
| 37 | + - steps: << parameters.after-deps >> |
| 38 | + |
| 39 | +# We want to make sure we run this only on master branch, release, or when we make tags |
| 40 | +run_complex: &run_complex |
| 41 | + filters: |
| 42 | + branches: |
| 43 | + only: |
| 44 | + - (master|release-v.*) |
| 45 | + tags: |
| 46 | + only: /.*/ |
| 47 | + |
| 48 | +jobs: |
| 49 | + Python38-Unit-Tests: |
| 50 | + docker: |
| 51 | + - image: cimg/python:3.8 |
| 52 | + environment: |
| 53 | + TOXENV: coverage,doctest,type,check |
| 54 | + TOX_INSTALL_DIR: .env |
| 55 | + JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 |
| 56 | + |
| 57 | + steps: |
| 58 | + - checkout |
| 59 | + - setup_dependencies |
| 60 | + - run: |
| 61 | + name: "Run Tox" |
| 62 | + command: tox |
| 63 | + |
| 64 | + Python37-Unit-Tests: |
| 65 | + docker: |
| 66 | + - image: cimg/python:3.7 |
| 67 | + environment: |
| 68 | + TOXENV: coverage,doctest,type,check |
| 69 | + TOX_INSTALL_DIR: .env |
| 70 | + JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 |
| 71 | + |
| 72 | + steps: |
| 73 | + - checkout |
| 74 | + - setup_dependencies |
| 75 | + - run: |
| 76 | + name: "Run Tox" |
| 77 | + command: tox |
| 78 | + |
| 79 | + Python36-Unit-Tests: |
| 80 | + docker: |
| 81 | + - image: cimg/python:3.6 |
| 82 | + environment: |
| 83 | + TOXENV: coverage,doctest,type,check |
| 84 | + TOX_INSTALL_DIR: .env |
| 85 | + JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 |
| 86 | + |
| 87 | + steps: |
| 88 | + - checkout |
| 89 | + - setup_dependencies |
| 90 | + - run: |
| 91 | + name: "Run Tox" |
| 92 | + command: tox |
| 93 | + Python38-Integration-Tests: |
| 94 | + docker: |
| 95 | + - image: cimg/python:3.8 |
| 96 | + environment: |
| 97 | + TOXENV: complex,type,check |
| 98 | + TOX_INSTALL_DIR: .env |
| 99 | + JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 |
| 100 | + |
| 101 | + steps: |
| 102 | + - checkout |
| 103 | + - setup_dependencies |
| 104 | + - run: |
| 105 | + name: "Run Tox" |
| 106 | + command: tox |
| 107 | + |
| 108 | + Python37-Integration-Tests: |
| 109 | + docker: |
| 110 | + - image: cimg/python:3.7 |
| 111 | + environment: |
| 112 | + TOXENV: complex,spark,type,check |
| 113 | + TOX_INSTALL_DIR: .env |
| 114 | + JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 |
| 115 | + |
| 116 | + steps: |
| 117 | + - checkout |
| 118 | + - setup_dependencies |
| 119 | + - run: |
| 120 | + name: "Run Tox" |
| 121 | + command: tox |
| 122 | + |
| 123 | + Python36-Integration-Tests: |
| 124 | + docker: |
| 125 | + - image: cimg/python:3.6 |
| 126 | + environment: |
| 127 | + TOXENV: coverage,complex,spark,doctest,type,check |
| 128 | + TOX_INSTALL_DIR: .env |
| 129 | + JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 |
| 130 | + |
| 131 | + steps: |
| 132 | + - checkout |
| 133 | + - setup_dependencies |
| 134 | + - run: |
| 135 | + name: "Run Tox" |
| 136 | + command: tox |
| 137 | + |
| 138 | +workflows: |
| 139 | + version: 2 |
| 140 | + |
| 141 | + Interation-Tests: |
| 142 | + jobs: |
| 143 | + - Python38-Integration-Tests: |
| 144 | + <<: *run_complex |
| 145 | + - Python37-Integration-Tests: |
| 146 | + <<: *run_complex |
| 147 | + - Python36-Integration-Tests: |
| 148 | + <<: *run_complex |
| 149 | + Unit-Tests: |
| 150 | + jobs: |
| 151 | + - Python37-Unit-Tests |
| 152 | + - Python36-Unit-Tests |
| 153 | + - Python38-Unit-Tests |
| 154 | + |
0 commit comments