|
18 | 18 | # |
19 | 19 | dist: xenial |
20 | 20 | language: python |
21 | | -python: |
22 | | - - "3.6" |
23 | 21 | env: |
24 | 22 | global: |
25 | | - - TRAVIS_CACHE=$HOME/.travis_cache/ |
26 | | - - CASS_DRIVER_BUILD_CONCURRENCY=8 |
27 | | - - CASS_DRIVER_NO_CYTHON=1 |
| 23 | + - BUILD_ID=${TRAVIS_BUILD_ID} |
| 24 | + - AIRFLOW_CONTAINER_BRANCH_NAME=${TRAVIS_BRANCH} |
28 | 25 | matrix: |
29 | | - - TOX_ENV=py35-backend_mysql-env_docker PYTHON_VERSION=3 |
30 | | - - TOX_ENV=py35-backend_sqlite-env_docker PYTHON_VERSION=3 |
31 | | - - TOX_ENV=py35-backend_postgres-env_docker PYTHON_VERSION=3 |
32 | | - - TOX_ENV=py35-backend_postgres-env_kubernetes KUBERNETES_VERSION=v1.13.0 PYTHON_VERSION=3 |
33 | | - |
| 26 | + - BACKEND=mysql ENV=docker |
| 27 | + - BACKEND=postgres ENV=docker |
| 28 | + - BACKEND=sqlite ENV=docker |
| 29 | + - BACKEND=postgres ENV=kubernetes KUBERNETES_VERSION=v1.13.0 |
| 30 | +python: |
| 31 | + - "3.6" |
| 32 | + - "3.5" |
| 33 | +matrix: |
| 34 | + exclude: |
| 35 | + - env: BACKEND=postgres ENV=docker |
| 36 | + python: "3.5" |
| 37 | + - env: BACKEND=mysql ENV=docker |
| 38 | + python: "3.5" |
| 39 | + - env: BACKEND=postgres ENV=kubernetes KUBERNETES_VERSION=v1.13.0 |
| 40 | + python: "3.5" |
| 41 | + - env: BACKEND=sqlite ENV=docker |
| 42 | + python: "3.6" |
34 | 43 | stages: |
35 | 44 | - pre-test |
36 | 45 | - test |
37 | | - |
38 | 46 | jobs: |
39 | 47 | include: |
40 | 48 | - name: Flake8 |
41 | 49 | stage: pre-test |
42 | | - install: pip install flake8 |
43 | | - script: flake8 |
| 50 | + script: ./scripts/ci/ci_flake8.sh |
| 51 | + install: skip |
44 | 52 | - name: mypy |
45 | 53 | stage: pre-test |
46 | | - install: pip install mypy |
47 | | - script: mypy airflow tests |
| 54 | + script: ./scripts/ci/ci_mypy.sh |
| 55 | + install: skip |
48 | 56 | - name: Check license header |
49 | 57 | stage: pre-test |
| 58 | + script: ./scripts/ci/ci_check_license.sh |
50 | 59 | install: skip |
51 | | - script: scripts/ci/6-check-license.sh |
52 | 60 | - name: Lint Dockerfile |
53 | 61 | stage: pre-test |
| 62 | + script: ./scripts/ci/ci_lint_dockerfile.sh |
54 | 63 | install: skip |
55 | | - script: scripts/ci/ci_lint_dockerfile.sh |
56 | 64 | - name: Check docs |
57 | | - stage: pre-test |
58 | | - install: pip install -e .[doc] |
59 | | - script: docs/build.sh |
| 65 | + stage: test |
| 66 | + script: ./scripts/ci/ci_docs.sh |
| 67 | + install: skip |
60 | 68 | - name: Pylint |
61 | 69 | stage: pre-test |
62 | | - install: pip install pylint~=2.3.1 # Ensure the same version as in setup.py |
63 | | - script: scripts/ci/ci_pylint.sh |
64 | | - cache: false |
65 | | -cache: |
66 | | - directories: |
67 | | - - $HOME/.wheelhouse/ |
68 | | - - $HOME/.cache/pip |
69 | | - - $HOME/.travis_cache/ |
| 70 | + script: ./scripts/ci/ci_pylint.sh |
| 71 | + install: skip |
| 72 | +services: |
| 73 | + - docker |
70 | 74 | before_install: |
71 | | - # Required for K8s v1.10.x. See |
72 | | - # https://github.com/kubernetes/kubernetes/issues/61058#issuecomment-372764783 |
73 | | - - if [ ! -z "$KUBERNETES_VERSION" ]; then sudo mount --make-shared / && sudo service docker restart; fi |
| 75 | + - ./scripts/ci/ci_before_install.sh |
74 | 76 | install: |
75 | | - - pip install --upgrade pip |
76 | | - - docker-compose -f scripts/ci/docker-compose.yml pull --quiet |
77 | | -script: |
78 | | - - if [ -z "$KUBERNETES_VERSION" ]; then |
79 | | - docker-compose --log-level ERROR -f scripts/ci/docker-compose.yml run airflow-testing /app/scripts/ci/run-ci.sh; |
80 | | - fi |
81 | | - - if [ ! -z "$KUBERNETES_VERSION" ]; then |
82 | | - ./scripts/ci/kubernetes/minikube/stop_minikube.sh && |
83 | | - ./scripts/ci/kubernetes/setup_kubernetes.sh && |
84 | | - ./scripts/ci/kubernetes/kube/deploy.sh -d persistent_mode && |
85 | | - MINIKUBE_IP=$(minikube ip) docker-compose --log-level ERROR -f scripts/ci/docker-compose.yml -f scripts/ci/docker-compose-kubernetes.yml run airflow-testing /app/scripts/ci/run-ci.sh; |
86 | | - fi |
87 | | - - if [ ! -z "$KUBERNETES_VERSION" ]; then |
88 | | - ./scripts/ci/kubernetes/minikube/stop_minikube.sh && |
89 | | - ./scripts/ci/kubernetes/setup_kubernetes.sh && |
90 | | - ./scripts/ci/kubernetes/kube/deploy.sh -d git_mode && |
91 | | - MINIKUBE_IP=$(minikube ip) docker-compose --log-level ERROR -f scripts/ci/docker-compose.yml -f scripts/ci/docker-compose-kubernetes.yml run airflow-testing /app/scripts/ci/run-ci.sh; |
92 | | - fi |
93 | | -before_cache: |
94 | | - - sudo chown -R travis:travis $HOME/.cache/pip $HOME/.wheelhouse/ |
| 77 | + - ./hooks/build |
| 78 | +script: "./scripts/ci/ci_run_airflow_testing.sh" |
0 commit comments