|
| 1 | +version: 2 |
| 2 | +jobs: |
| 3 | + test-3.11: |
| 4 | + docker: |
| 5 | + - image: cimg/python:3.11 |
| 6 | + environment: |
| 7 | + PIPENV_VENV_IN_PROJECT: true |
| 8 | + steps: |
| 9 | + - checkout |
| 10 | + - restore_cache: |
| 11 | + name: Restoring Pip Cache |
| 12 | + keys: |
| 13 | + - pip-cache-v11-cimg/python:3.11-{{ checksum "setup.py" }} |
| 14 | + - pip-cache-v11-cimg/python:3.11- |
| 15 | + - run: |
| 16 | + name: Running tests |
| 17 | + command: | |
| 18 | + python --version |
| 19 | + mkdir test-reports || true |
| 20 | + pip install . --user |
| 21 | + pip install .\[dataframe\] --user |
| 22 | + pip install .\[test\] --user |
| 23 | + pytest -m "not integration" tests --junitxml=test-reports/junit.xml --cov=./influxdb_client_3 --cov-report xml:coverage.xml |
| 24 | + - save_cache: |
| 25 | + name: Saving Pip Cache |
| 26 | + key: pip-cache-v11-cimg/python:3.11-{{ checksum "setup.py" }} |
| 27 | + paths: |
| 28 | + - .venv |
| 29 | + - ~/.cache/pip |
| 30 | + - /usr/local/lib/site-python |
| 31 | + when: always |
| 32 | + - store_test_results: |
| 33 | + path: test-reports |
| 34 | + - run: |
| 35 | + name: Collecting coverage reports |
| 36 | + command: | |
| 37 | + curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 38 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 39 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 40 | + curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 41 | + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 42 | + shasum -a 256 -c codecov.SHA256SUM |
| 43 | + chmod +x ./codecov |
| 44 | + ./codecov |
| 45 | + test-3.8: |
| 46 | + docker: |
| 47 | + - image: cimg/python:3.8 |
| 48 | + environment: |
| 49 | + PIPENV_VENV_IN_PROJECT: true |
| 50 | + steps: |
| 51 | + - checkout |
| 52 | + - restore_cache: |
| 53 | + name: Restoring Pip Cache |
| 54 | + keys: |
| 55 | + - pip-cache-v11-cimg/python:3.8-{{ checksum "setup.py" }} |
| 56 | + - pip-cache-v11-cimg/python:3.8- |
| 57 | + - run: |
| 58 | + name: Running tests |
| 59 | + command: | |
| 60 | + python --version |
| 61 | + mkdir test-reports || true |
| 62 | + pip install . --user |
| 63 | + pip install .\[dataframe\] --user |
| 64 | + pip install .\[test\] --user |
| 65 | + pytest -m "not integration" tests --junitxml=test-reports/junit.xml --cov=./influxdb_client_3 --cov-report xml:coverage.xml |
| 66 | + - save_cache: |
| 67 | + name: Saving Pip Cache |
| 68 | + key: pip-cache-v11-cimg/python:3.8-{{ checksum "setup.py" }} |
| 69 | + paths: |
| 70 | + - .venv |
| 71 | + - ~/.cache/pip |
| 72 | + - /usr/local/lib/site-python |
| 73 | + when: always |
| 74 | + - store_test_results: |
| 75 | + path: test-reports |
| 76 | + - run: |
| 77 | + name: Collecting coverage reports |
| 78 | + command: | |
| 79 | + curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 80 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 81 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 82 | + curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 83 | + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 84 | + shasum -a 256 -c codecov.SHA256SUM |
| 85 | + chmod +x ./codecov |
| 86 | + ./codecov |
| 87 | + check-twine: |
| 88 | + docker: |
| 89 | + - image: cimg/python:3.8 |
| 90 | + environment: |
| 91 | + PIPENV_VENV_IN_PROJECT: true |
| 92 | + steps: |
| 93 | + - checkout |
| 94 | + - run: |
| 95 | + name: Checks that the description will render correctly on PyPI. |
| 96 | + command: | |
| 97 | + pip install --upgrade pip |
| 98 | + pip install 'twine>=5.1,<6.1' --user |
| 99 | + python setup.py sdist bdist_wheel |
| 100 | + twine check dist/* |
| 101 | + test-integration: |
| 102 | + docker: |
| 103 | + - image: cimg/python:3.8 |
| 104 | + environment: |
| 105 | + PIPENV_VENV_IN_PROJECT: true |
| 106 | + steps: |
| 107 | + - checkout |
| 108 | + - restore_cache: |
| 109 | + name: Restoring Pip Cache |
| 110 | + keys: |
| 111 | + - pip-cache-v11-cimg/python:3.8-{{ checksum "setup.py" }} |
| 112 | + - pip-cache-v11-cimg/python:3.8- |
| 113 | + - run: |
| 114 | + name: Running tests |
| 115 | + command: | |
| 116 | + python --version |
| 117 | + mkdir test-reports || true |
| 118 | + pip install . --user |
| 119 | + pip install .\[dataframe\] --user |
| 120 | + pip install .\[test\] --user |
| 121 | + pytest -m "integration" tests --junitxml=test-reports/junit.xml --cov=./influxdb_client_3 --cov-report xml:coverage.xml |
| 122 | + - save_cache: |
| 123 | + name: Saving Pip Cache |
| 124 | + key: pip-cache-v11-cimg/python:3.8-{{ checksum "setup.py" }} |
| 125 | + paths: |
| 126 | + - .venv |
| 127 | + - ~/.cache/pip |
| 128 | + - /usr/local/lib/site-python |
| 129 | + when: always |
| 130 | + - store_test_results: |
| 131 | + path: test-reports |
| 132 | + - run: |
| 133 | + name: Collecting coverage reports |
| 134 | + command: | |
| 135 | + curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 136 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 137 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 138 | + curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 139 | + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 140 | + shasum -a 256 -c codecov.SHA256SUM |
| 141 | + chmod +x ./codecov |
| 142 | + ./codecov |
| 143 | + test-3.9: |
| 144 | + docker: |
| 145 | + - image: cimg/python:3.9 |
| 146 | + environment: |
| 147 | + PIPENV_VENV_IN_PROJECT: true |
| 148 | + steps: |
| 149 | + - checkout |
| 150 | + - restore_cache: |
| 151 | + name: Restoring Pip Cache |
| 152 | + keys: |
| 153 | + - pip-cache-v11-cimg/python:3.9-{{ checksum "setup.py" }} |
| 154 | + - pip-cache-v11-cimg/python:3.9- |
| 155 | + - run: |
| 156 | + name: Running tests |
| 157 | + command: | |
| 158 | + python --version |
| 159 | + mkdir test-reports || true |
| 160 | + pip install . --user |
| 161 | + pip install .\[dataframe\] --user |
| 162 | + pip install .\[test\] --user |
| 163 | + pytest -m "not integration" tests --junitxml=test-reports/junit.xml --cov=./influxdb_client_3 --cov-report xml:coverage.xml |
| 164 | + - save_cache: |
| 165 | + name: Saving Pip Cache |
| 166 | + key: pip-cache-v11-cimg/python:3.9-{{ checksum "setup.py" }} |
| 167 | + paths: |
| 168 | + - .venv |
| 169 | + - ~/.cache/pip |
| 170 | + - /usr/local/lib/site-python |
| 171 | + when: always |
| 172 | + - store_test_results: |
| 173 | + path: test-reports |
| 174 | + - run: |
| 175 | + name: Collecting coverage reports |
| 176 | + command: | |
| 177 | + curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 178 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 179 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 180 | + curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 181 | + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 182 | + shasum -a 256 -c codecov.SHA256SUM |
| 183 | + chmod +x ./codecov |
| 184 | + ./codecov |
| 185 | + test-3.10: |
| 186 | + docker: |
| 187 | + - image: cimg/python:3.10 |
| 188 | + environment: |
| 189 | + PIPENV_VENV_IN_PROJECT: true |
| 190 | + steps: |
| 191 | + - checkout |
| 192 | + - restore_cache: |
| 193 | + name: Restoring Pip Cache |
| 194 | + keys: |
| 195 | + - pip-cache-v11-cimg/python:3.10-{{ checksum "setup.py" }} |
| 196 | + - pip-cache-v11-cimg/python:3.10- |
| 197 | + - run: |
| 198 | + name: Running tests |
| 199 | + command: | |
| 200 | + python --version |
| 201 | + mkdir test-reports || true |
| 202 | + pip install . --user |
| 203 | + pip install .\[dataframe\] --user |
| 204 | + pip install .\[test\] --user |
| 205 | + pytest -m "not integration" tests --junitxml=test-reports/junit.xml --cov=./influxdb_client_3 --cov-report xml:coverage.xml |
| 206 | + - save_cache: |
| 207 | + name: Saving Pip Cache |
| 208 | + key: pip-cache-v11-cimg/python:3.10-{{ checksum "setup.py" }} |
| 209 | + paths: |
| 210 | + - .venv |
| 211 | + - ~/.cache/pip |
| 212 | + - /usr/local/lib/site-python |
| 213 | + when: always |
| 214 | + - store_test_results: |
| 215 | + path: test-reports |
| 216 | + - run: |
| 217 | + name: Collecting coverage reports |
| 218 | + command: | |
| 219 | + curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 220 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 221 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 222 | + curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 223 | + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 224 | + shasum -a 256 -c codecov.SHA256SUM |
| 225 | + chmod +x ./codecov |
| 226 | + ./codecov |
| 227 | + test-3.13: |
| 228 | + docker: |
| 229 | + - image: cimg/python:3.13 |
| 230 | + environment: |
| 231 | + PIPENV_VENV_IN_PROJECT: true |
| 232 | + steps: |
| 233 | + - checkout |
| 234 | + - restore_cache: |
| 235 | + name: Restoring Pip Cache |
| 236 | + keys: |
| 237 | + - pip-cache-v11-cimg/python:3.13-{{ checksum "setup.py" }} |
| 238 | + - pip-cache-v11-cimg/python:3.13- |
| 239 | + - run: |
| 240 | + name: Running tests |
| 241 | + command: | |
| 242 | + python --version |
| 243 | + mkdir test-reports || true |
| 244 | + pip install . --user |
| 245 | + pip install .\[dataframe\] --user |
| 246 | + pip install .\[test\] --user |
| 247 | + pytest -m "not integration" tests --junitxml=test-reports/junit.xml --cov=./influxdb_client_3 --cov-report xml:coverage.xml |
| 248 | + - save_cache: |
| 249 | + name: Saving Pip Cache |
| 250 | + key: pip-cache-v11-cimg/python:3.13-{{ checksum "setup.py" }} |
| 251 | + paths: |
| 252 | + - .venv |
| 253 | + - ~/.cache/pip |
| 254 | + - /usr/local/lib/site-python |
| 255 | + when: always |
| 256 | + - store_test_results: |
| 257 | + path: test-reports |
| 258 | + - run: |
| 259 | + name: Collecting coverage reports |
| 260 | + command: | |
| 261 | + curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 262 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 263 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 264 | + curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 265 | + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 266 | + shasum -a 256 -c codecov.SHA256SUM |
| 267 | + chmod +x ./codecov |
| 268 | + ./codecov |
| 269 | + test-3.12: |
| 270 | + docker: |
| 271 | + - image: cimg/python:3.12 |
| 272 | + environment: |
| 273 | + PIPENV_VENV_IN_PROJECT: true |
| 274 | + steps: |
| 275 | + - checkout |
| 276 | + - restore_cache: |
| 277 | + name: Restoring Pip Cache |
| 278 | + keys: |
| 279 | + - pip-cache-v11-cimg/python:3.12-{{ checksum "setup.py" }} |
| 280 | + - pip-cache-v11-cimg/python:3.12- |
| 281 | + - run: |
| 282 | + name: Running tests |
| 283 | + command: | |
| 284 | + python --version |
| 285 | + mkdir test-reports || true |
| 286 | + pip install . --user |
| 287 | + pip install .\[dataframe\] --user |
| 288 | + pip install .\[test\] --user |
| 289 | + pytest -m "not integration" tests --junitxml=test-reports/junit.xml --cov=./influxdb_client_3 --cov-report xml:coverage.xml |
| 290 | + - save_cache: |
| 291 | + name: Saving Pip Cache |
| 292 | + key: pip-cache-v11-cimg/python:3.12-{{ checksum "setup.py" }} |
| 293 | + paths: |
| 294 | + - .venv |
| 295 | + - ~/.cache/pip |
| 296 | + - /usr/local/lib/site-python |
| 297 | + when: always |
| 298 | + - store_test_results: |
| 299 | + path: test-reports |
| 300 | + - run: |
| 301 | + name: Collecting coverage reports |
| 302 | + command: | |
| 303 | + curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 304 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM |
| 305 | + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig |
| 306 | + curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import |
| 307 | + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM |
| 308 | + shasum -a 256 -c codecov.SHA256SUM |
| 309 | + chmod +x ./codecov |
| 310 | + ./codecov |
| 311 | + check-code-style: |
| 312 | + docker: |
| 313 | + - image: cimg/python:3.8 |
| 314 | + environment: |
| 315 | + PIPENV_VENV_IN_PROJECT: true |
| 316 | + steps: |
| 317 | + - checkout |
| 318 | + - run: |
| 319 | + name: Checks style consistency of setup.py. |
| 320 | + command: | |
| 321 | + pip install flake8 --user |
| 322 | + flake8 setup.py |
| 323 | + - run: |
| 324 | + name: Checks style consistency across sources. |
| 325 | + command: | |
| 326 | + pip install flake8 --user |
| 327 | + flake8 influxdb_client_3/ |
| 328 | + - run: |
| 329 | + name: Checks style consistency across tests. |
| 330 | + command: | |
| 331 | + pip install flake8 --user |
| 332 | + flake8 tests/ |
| 333 | + - run: |
| 334 | + name: Checks style consistency across examples. |
| 335 | + command: | |
| 336 | + pip install flake8 --user |
| 337 | + flake8 Examples/ |
| 338 | +workflows: |
| 339 | + version: 2 |
| 340 | + build: |
| 341 | + jobs: |
| 342 | + - check-code-style |
| 343 | + - check-twine |
| 344 | + - test-3.8 |
| 345 | + - test-3.9 |
| 346 | + - test-3.10 |
| 347 | + - test-3.11 |
| 348 | + - test-3.12 |
| 349 | + - test-3.13 |
| 350 | + - test-integration: |
| 351 | + requires: |
| 352 | + - test-3.8 |
| 353 | + - test-3.9 |
| 354 | + - test-3.10 |
| 355 | + - test-3.11 |
| 356 | + - test-3.12 |
| 357 | + - test-3.13 |
| 358 | + upstream: |
| 359 | + test-3.8: |
| 360 | + - success |
| 361 | + test-3.9: |
| 362 | + - success |
| 363 | + test-3.10: |
| 364 | + - success |
| 365 | + test-3.11: |
| 366 | + - success |
| 367 | + test-3.12: |
| 368 | + - success |
| 369 | + test-3.13: |
| 370 | + - success |
0 commit comments