From d80c2ed72abe1db9c37c21d36cf48642b43bdb25 Mon Sep 17 00:00:00 2001 From: Amit Miran <47772523+amitmiran137@users.noreply.github.com> Date: Fri, 22 Jan 2021 02:10:17 +0200 Subject: [PATCH] chore: skip CI on draft PR (#12666) --- .github/workflows/docker.yml | 3 ++- .github/workflows/superset-e2e.yml | 4 +++- .github/workflows/superset-frontend.yml | 2 ++ .github/workflows/superset-python-misc.yml | 4 ++++ .github/workflows/superset-python-presto-hive.yml | 3 +++ .github/workflows/superset-python-unittest.yml | 4 ++++ .github/workflows/superset-translations.yml | 3 +++ 7 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 47efc8f0b..b686e91be 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,10 +5,11 @@ on: branches: - 'master' pull_request: - types: [opened, synchronize, reopened] + types: [synchronize, opened, reopened, ready_for_review] jobs: build: + if: github.event.pull_request.draft == false name: build runs-on: ubuntu-latest steps: diff --git a/.github/workflows/superset-e2e.yml b/.github/workflows/superset-e2e.yml index 8dbee8a42..a56322cfa 100644 --- a/.github/workflows/superset-e2e.yml +++ b/.github/workflows/superset-e2e.yml @@ -7,9 +7,11 @@ on: paths-ignore: - "docs/**" pull_request: + types: [synchronize, opened, reopened, ready_for_review] jobs: cypress-matrix: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 strategy: # when one test fails, DO NOT cancel the other @@ -103,7 +105,7 @@ jobs: name: screenshots path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots Cypress: - if: ${{ always() }} + if: github.event.pull_request.draft == false && ${{ always() }} name: Cypress (chrome) runs-on: ubuntu-20.04 needs: cypress-matrix diff --git a/.github/workflows/superset-frontend.yml b/.github/workflows/superset-frontend.yml index 4b900108e..3177e4f67 100644 --- a/.github/workflows/superset-frontend.yml +++ b/.github/workflows/superset-frontend.yml @@ -6,9 +6,11 @@ on: - "dependabot/**/docs/**" - "dependabot/**/cypress-base/**" pull_request: + types: [synchronize, opened, reopened, ready_for_review] jobs: build: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 steps: - name: Checkout code diff --git a/.github/workflows/superset-python-misc.yml b/.github/workflows/superset-python-misc.yml index cf069e8f0..65dcbd211 100644 --- a/.github/workflows/superset-python-misc.yml +++ b/.github/workflows/superset-python-misc.yml @@ -6,9 +6,11 @@ on: branches-ignore: - "dependabot/npm_and_yarn/**" pull_request: + types: [synchronize, opened, reopened, ready_for_review] jobs: lint: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 strategy: matrix: @@ -32,6 +34,7 @@ jobs: run: pylint -j 0 superset pre-commit: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 strategy: matrix: @@ -54,6 +57,7 @@ jobs: run: pre-commit run --all-files babel-extract: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 strategy: matrix: diff --git a/.github/workflows/superset-python-presto-hive.yml b/.github/workflows/superset-python-presto-hive.yml index 8a85686b7..b8d68fa29 100644 --- a/.github/workflows/superset-python-presto-hive.yml +++ b/.github/workflows/superset-python-presto-hive.yml @@ -6,9 +6,11 @@ on: branches-ignore: - "dependabot/npm_and_yarn/**" pull_request: + types: [synchronize, opened, reopened, ready_for_review] jobs: test-postgres-presto: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 strategy: matrix: @@ -67,6 +69,7 @@ jobs: bash <(curl -s https://codecov.io/bash) -cF python test-postgres-hive: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 strategy: matrix: diff --git a/.github/workflows/superset-python-unittest.yml b/.github/workflows/superset-python-unittest.yml index 2897da848..97ed03c16 100644 --- a/.github/workflows/superset-python-unittest.yml +++ b/.github/workflows/superset-python-unittest.yml @@ -6,9 +6,11 @@ on: branches-ignore: - "dependabot/npm_and_yarn/**" pull_request: + types: [synchronize, opened, reopened, ready_for_review] jobs: test-mysql: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 strategy: matrix: @@ -55,6 +57,7 @@ jobs: bash <(curl -s https://codecov.io/bash) -cF python test-postgres: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 strategy: matrix: @@ -102,6 +105,7 @@ jobs: bash <(curl -s https://codecov.io/bash) -cF python test-sqlite: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 strategy: matrix: diff --git a/.github/workflows/superset-translations.yml b/.github/workflows/superset-translations.yml index 95b4fca13..f1cb5a513 100644 --- a/.github/workflows/superset-translations.yml +++ b/.github/workflows/superset-translations.yml @@ -5,9 +5,11 @@ on: branches-ignore: - "dependabot/npm_and_yarn/**" pull_request: + types: [synchronize, opened, reopened, ready_for_review] jobs: frontend-check: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 steps: - name: Checkout code @@ -22,6 +24,7 @@ jobs: npm run check-translation babel-extract: + if: github.event.pull_request.draft == false runs-on: ubuntu-20.04 strategy: matrix: