Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/docker-and-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: "dependency tests"
on: [pull_request, push]
env:
TRAVIS_BRANCH: "master"
jobs:
create-production-docker-image:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7]
steps:
- uses: actions/checkout@v2
name: checkout
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: build docker image
run: ./scripts/ci/ci_build_production_image.sh
env:
PYTHON_MAJOR_MINOR_VERSION: ${{ matrix.python-version }}
generate-requirements:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6,3.7]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python-version: [3.6,3.7]
python-version: [3.6, 3.7]

yamlint

steps:
- uses: actions/checkout@v2
name: checkout
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: install airflow
Copy link
Member

@potiuk potiuk Apr 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. We do not need to install airflow on the host and it adds few minutes to the build

run: python setup.py install
- name: generate requirements
run: ./scripts/ci/ci_generate_requirements.sh
env:
PYTHON_MAJOR_MINOR_VERSION: ${{ matrix.python-version }}
SHOW_GENERATE_REQUIREMENTS_INSTRUCTIONS: true

36 changes: 36 additions & 0 deletions .github/workflows/static-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "static tests"
on: [pull_request, push]
env:
TRAVIS_BRANCH: "master"
jobs:
statics-tests:
name: Static tests
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.6
AIRFLOW_MOUNT_SOURCE_DIR_FOR_STATIC_CHECKS: "true"
TRAVIS_JOB_NAME: "Static"
strategy:
matrix:
scripts: [ci_run_static_checks_pylint_tests.sh,
ci_mypy.sh,
run_fix_ownership.sh,
ci_check_license.sh,
pre_commit_flake8.sh,
pre_commit_bat_tests.sh,
pre_commit_pylint_main.sh,
ci_docs.sh
]
steps:
- uses: actions/checkout@v2
name: checkout
- uses: actions/setup-python@v1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Before install"
run: ./scripts/ci/ci_before_install.sh
- name: "Static checks tests"
if: success()
env:
PYTHON_VERSION: 3.6
run: ./scripts/ci/${{ matrix.scripts }}
50 changes: 0 additions & 50 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,11 @@ env:
- CI="true"
python: "3.6"
stages:
- pre-test
- test
services:
- docker
jobs:
include:
Copy link
Member

@potiuk potiuk Apr 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid we do not gain much by this. This will significantly INCREASE pressure on Travis. We have quite a lot of tests NOT running because static checks fail - that's probably >50% cases. If we just remove pre-test steps, then we will have a lot more "test" jobs blocking the Travis Queue because they will run regardless if static checks fail.

- name: "Static checks"
stage: pre-test
script: ./scripts/ci/ci_run_all_static_checks.sh
env: >-
PYTHON_MAJOR_MINOR_VERSION=3.6
AIRFLOW_MOUNT_SOURCE_DIR_FOR_STATIC_CHECKS="true"
SKIP=pylint-tests
- name: "Static checks - pylint tests only"
stage: pre-test
script: ./scripts/ci/ci_run_static_checks_pylint_tests.sh
env: >-
PYTHON_MAJOR_MINOR_VERSION=3.6
AIRFLOW_MOUNT_SOURCE_DIR_FOR_STATIC_CHECKS="true"
- name: "Build documentation"
env: >-
PYTHON_MAJOR_MINOR_VERSION=3.6
stage: test
script: ./scripts/ci/ci_docs.sh
- name: "Tests [Py3.6][Kubernetes][persistent]"
env: >-
BACKEND=postgres
Expand Down Expand Up @@ -133,37 +114,6 @@ jobs:
ENABLED_INTEGRATIONS="kerberos"
script: "./scripts/ci/ci_run_airflow_testing.sh --ignore=tests/providers"
stage: test
- name: "Generate requirements Py3.6"
env: >-
PYTHON_MAJOR_MINOR_VERSION=3.6
SHOW_GENERATE_REQUIREMENTS_INSTRUCTIONS="true"
stage: test
script: ./scripts/ci/ci_generate_requirements.sh
- name: "Generate requirements Py3.7"
env: >-
PYTHON_MAJOR_MINOR_VERSION=3.7
SHOW_GENERATE_REQUIREMENTS_INSTRUCTIONS="true"
stage: test
script: ./scripts/ci/ci_generate_requirements.sh
- name: "Prepare & test backport packages 1.10.9"
env: >-
INSTALL_AIRFLOW_VERSION="1.10.9"
stage: test
script: ./scripts/ci/ci_prepare_and_test_backport_packages.sh
- name: "Build production image Py3.6"
env: >-
PYTHON_MAJOR_MINOR_VERSION="3.6"
stage: test
script: ./scripts/ci/ci_build_production_image.sh
before_install:
- echo
- name: "Build production image Py3.7"
env: >-
PYTHON_MAJOR_MINOR_VERSION="3.7"
stage: test
script: ./scripts/ci/ci_build_production_image.sh
before_install:
- echo
install: skip
before_install:
- ./scripts/ci/ci_before_install.sh
Expand Down
1 change: 0 additions & 1 deletion scripts/ci/_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ declare -a EXTRA_DOCKER_FLAGS
declare -a EXTRA_DOCKER_PROD_BUILD_FLAGS
export EXTRA_DOCKER_FLAGS
export EXTRA_DOCKER_PROD_BUILD_FLAGS

function check_verbose_setup {
if [[ ${VERBOSE_COMMANDS:="false"} == "true" ]]; then
set -x
Expand Down