|
| 1 | +version: 2.1 |
| 2 | + |
| 3 | +orbs: |
| 4 | + |
| 5 | + |
| 6 | +jobs: |
| 7 | + dcc-percy-finalize: |
| 8 | + working_directory: ~/dash/components/dash-core-components |
| 9 | + docker: |
| 10 | + - image: percyio/agent |
| 11 | + auth: |
| 12 | + username: dashautomation |
| 13 | + password: $DASH_PAT_DOCKERHUB |
| 14 | + steps: |
| 15 | + - checkout: |
| 16 | + path: ~/dash |
| 17 | + - run: percy finalize --all |
| 18 | + |
| 19 | + dcc-lint-unit-39: &lint-unit |
| 20 | + working_directory: ~/dash/components/dash-core-components |
| 21 | + docker: |
| 22 | + - image: circleci/python:3.9.2-buster-node-browsers |
| 23 | + auth: |
| 24 | + username: dashautomation |
| 25 | + password: $DASH_PAT_DOCKERHUB |
| 26 | + environment: |
| 27 | + PYTHON_VERSION: py39 |
| 28 | + steps: |
| 29 | + - checkout: |
| 30 | + path: ~/dash |
| 31 | + - run: echo $PYTHON_VERSION > ver.txt |
| 32 | + - restore_cache: |
| 33 | + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }} |
| 34 | + - run: |
| 35 | + name: 🐍 pip dev requirements |
| 36 | + command: | |
| 37 | + sudo pip install virtualenv --upgrade |
| 38 | + python -m venv venv || virtualenv venv && . venv/bin/activate |
| 39 | + pip install --progress-bar off -e git+https://github.com/plotly/dash.git@dev#egg=dash[dev,testing] |
| 40 | + pip install --progress-bar off --no-cache-dir -r dev-requirements.txt |
| 41 | + - save_cache: |
| 42 | + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }} |
| 43 | + paths: |
| 44 | + - venv |
| 45 | + - run: |
| 46 | + name: 🌸 Lint |
| 47 | + command: | |
| 48 | + . venv/bin/activate |
| 49 | + set -eo pipefail |
| 50 | + npm ci |
| 51 | + npm run lint |
| 52 | +
|
| 53 | + dcc-lint-unit-36: |
| 54 | + <<: *lint-unit |
| 55 | + docker: |
| 56 | + - image: circleci/python:3.6.13-stretch-node-browsers |
| 57 | + auth: |
| 58 | + username: dashautomation |
| 59 | + password: $DASH_PAT_DOCKERHUB |
| 60 | + environment: |
| 61 | + PYTHON_VERSION: py36 |
| 62 | + |
| 63 | + dcc-build-dash-39: &build-dash |
| 64 | + working_directory: ~/dash/components/dash-core-components |
| 65 | + docker: |
| 66 | + - image: circleci/python:3.9.2-buster-node-browsers |
| 67 | + auth: |
| 68 | + username: dashautomation |
| 69 | + password: $DASH_PAT_DOCKERHUB |
| 70 | + environment: |
| 71 | + PYTHON_VERSION: py39 |
| 72 | + steps: |
| 73 | + - checkout: |
| 74 | + path: ~/dash |
| 75 | + - run: echo $PYTHON_VERSION > ver.txt |
| 76 | + - restore_cache: |
| 77 | + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }} |
| 78 | + - run: |
| 79 | + name: 🐍 pip dev requirements |
| 80 | + command: | |
| 81 | + sudo pip install virtualenv --upgrade |
| 82 | + python -m venv venv || virtualenv venv && . venv/bin/activate |
| 83 | + set -eo pipefail |
| 84 | + pip install --progress-bar off --no-cache-dir -r dev-requirements.txt |
| 85 | + - save_cache: |
| 86 | + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }} |
| 87 | + paths: |
| 88 | + - venv |
| 89 | + - run: |
| 90 | + name: 🏗️ build dash |
| 91 | + command: | |
| 92 | + . venv/bin/activate && mkdir packages |
| 93 | + set -eo pipefail |
| 94 | + # build main dash & renderer |
| 95 | + git clone --depth 1 -b dash-monorepo [email protected]:plotly/dash.git dash-main |
| 96 | + cd dash-main && pip install -e .[dev] --progress-bar off && renderer build |
| 97 | + python setup.py sdist && mv dist/* ../packages/ && cd .. |
| 98 | + # build html |
| 99 | + git clone --depth 1 https://github.com/plotly/dash-html-components.git |
| 100 | + git clone --depth 1 [email protected]:plotly/dash-table.git |
| 101 | + cd dash-html-components && npm ci && npm run build && python setup.py sdist && mv dist/* ../packages && cd .. |
| 102 | + cd dash-table && npm ci && npm run build && python setup.py sdist && mv dist/* ../packages && cd .. |
| 103 | + # build dcc |
| 104 | + npm ci && npm run build && python setup.py sdist && mv dist/* ./packages && ls -la packages |
| 105 | + - persist_to_workspace: |
| 106 | + root: ~/dash/components/dash-core-components |
| 107 | + paths: |
| 108 | + - packages |
| 109 | + |
| 110 | + dcc-build-dash-36: |
| 111 | + <<: *build-dash |
| 112 | + docker: |
| 113 | + - image: circleci/python:3.6.13-stretch-node-browsers |
| 114 | + auth: |
| 115 | + username: dashautomation |
| 116 | + password: $DASH_PAT_DOCKERHUB |
| 117 | + environment: |
| 118 | + PYTHON_VERSION: py36 |
| 119 | + |
| 120 | + dcc-test-39: &test |
| 121 | + working_directory: ~/dash/components/dash-core-components |
| 122 | + docker: |
| 123 | + - image: circleci/python:3.9.2-buster-node-browsers |
| 124 | + auth: |
| 125 | + username: dashautomation |
| 126 | + password: $DASH_PAT_DOCKERHUB |
| 127 | + environment: |
| 128 | + PYTHON_VERSION: py39 |
| 129 | + PERCY_PARALLEL_TOTAL: -1 |
| 130 | + PERCY_ENABLE: 1 |
| 131 | + parallelism: 3 |
| 132 | + steps: |
| 133 | + - checkout: |
| 134 | + path: ~/dash |
| 135 | + - run: echo $PYTHON_VERSION > ver.txt |
| 136 | + - restore_cache: |
| 137 | + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }} |
| 138 | + - attach_workspace: |
| 139 | + at: ~/dash/components/dash-core-components |
| 140 | + - run: |
| 141 | + name: 🧪 Run Integration Tests |
| 142 | + command: | |
| 143 | + . venv/bin/activate && rm -rf dash_core_components && ls -la |
| 144 | + set -eo pipefail |
| 145 | + cd packages && mv dash-*.tar.gz main.tar.gz && ls -la |
| 146 | + find . -name "dash_*.gz" | xargs pip install -I --progress-bar off --no-cache-dir |
| 147 | + pip install --no-cache-dir --progress-bar off main.tar.gz[dev,testing] |
| 148 | + pip list | grep dash | xargs pip show && cd .. |
| 149 | + echo $(python -V 2>&1) | grep 3. |
| 150 | + TESTFILES=$(circleci tests glob "tests/integration/**/test_*.py" | circleci tests split --split-by=timings) |
| 151 | + pytest --headless --nopercyfinalize --junitxml=test-reports/junit_intg.xml ${TESTFILES} |
| 152 | + - store_artifacts: |
| 153 | + path: ~/dash/components/dash-core-components/test-reports |
| 154 | + - store_test_results: |
| 155 | + path: ~/dash/components/dash-core-components/test-reports |
| 156 | + - store_artifacts: |
| 157 | + path: /tmp/dash_artifacts |
| 158 | + |
| 159 | + dcc-test-36: |
| 160 | + <<: *test |
| 161 | + docker: |
| 162 | + - image: circleci/python:3.6.13-stretch-node-browsers |
| 163 | + auth: |
| 164 | + username: dashautomation |
| 165 | + password: $DASH_PAT_DOCKERHUB |
| 166 | + environment: |
| 167 | + PYTHON_VERSION: py36 |
| 168 | + PERCY_ENABLE: 0 |
| 169 | + |
| 170 | +workflows: |
| 171 | + dcc-python3.9: |
| 172 | + jobs: |
| 173 | + - dcc-lint-unit-39 |
| 174 | + - dcc-build-dash-39 |
| 175 | + - dcc-test-39: |
| 176 | + requires: |
| 177 | + - dcc-build-dash-39 |
| 178 | + - dcc-percy-finalize: |
| 179 | + requires: |
| 180 | + - dcc-test-39 |
| 181 | + |
| 182 | + dcc-python3.6: |
| 183 | + jobs: |
| 184 | + - dcc-lint-unit-36 |
| 185 | + - dcc-build-dash-36 |
| 186 | + - dcc-test-36: |
| 187 | + requires: |
| 188 | + - dcc-build-dash-36 |
0 commit comments