You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/15 18:04:38 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #8383: Remove steps from travis

potiuk commented on a change in pull request #8383: Remove steps from travis
URL: https://github.com/apache/airflow/pull/8383#discussion_r409031164
 
 

 ##########
 File path: .github/workflows/docker-and-dependencies.yml
 ##########
 @@ -0,0 +1,111 @@
+# 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: "static and 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: install airflow
+        run: pip install -e .[devel]
+      - 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]
+    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
+        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
+
+  statics-tests:
+    name: Pylint for tests
+    runs-on: ubuntu-latest
+    env:
+      PYTHON_VERSION: 3.6
+      AIRFLOW_MOUNT_SOURCE_DIR_FOR_STATIC_CHECKS: "true"
+      TRAVIS_JOB_NAME: "Static"
+    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/ci_run_static_checks_pylint_tests.sh
+
+  docs:
+    name: Build docs
+    runs-on: ubuntu-latest
+    env:
+      TRAVIS_JOB_NAME: "Build documentation"
+      PYTHON_VERSION: 3.6
+    steps:
+      - uses: actions/checkout@master
+      - name: "Build documentation"
+        run: ./scripts/ci/ci_docs.sh
+
+  static-tests:
+    name: Static checks
+    runs-on: ubuntu-latest
+    env:
+      PYTHON_VERSION: 3.6
+      AIRFLOW_MOUNT_SOURCE_DIR_FOR_STATIC_CHECKS: "true"
+      TRAVIS_JOB_NAME: "Static"
 
 Review comment:
   I'd rather change condition in the script or maybe pass the name via run command parameter for example. The reason why I used name of the job was that I wanted to keep single "before_install" script. In Travis all the "before install" scripts are folded once finished so you do not see them in the logs by default. It would be great to find similar solution for Github Actions. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services