Fixed: CI Runs on Ready PRs Only (#2324)

* Revert "Update tests to not run all the time (#2311)"

This reverts commit 2c03eee329.

* Make CI only runs on PRs that are ready

* Remove CI Tasks on Push
This commit is contained in:
Zhiwei 2021-12-05 15:05:07 -07:00 committed by GitHub
parent 19f6544923
commit cf3c205fa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 23 additions and 12 deletions

View File

@ -5,12 +5,13 @@ on:
branches: [ main ] branches: [ main ]
pull_request: pull_request:
branches: [ main ] branches: [ main ]
types: [review_requested, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
schedule: schedule:
- cron: '25 16 * * 0' - cron: '25 16 * * 0'
jobs: jobs:
analyze: analyze:
if: github.event.pull_request.draft == false
name: Analyze name: Analyze
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -11,9 +11,10 @@ on:
pull_request: pull_request:
paths: paths:
- "!*.MD" - "!*.MD"
types: [review_requested, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
jobs: jobs:
test: test:
if: github.event.pull_request.draft == false
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:

View File

@ -3,10 +3,11 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
types: [review_requested, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
jobs: jobs:
bandit: bandit:
if: github.event.pull_request.draft == false
name: type-check-${{ matrix.config.python-version }} name: type-check-${{ matrix.config.python-version }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:

View File

@ -3,10 +3,11 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
types: [review_requested, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
jobs: jobs:
docsLinter: docsLinter:
if: github.event.pull_request.draft == false
name: Lint Documentation name: Lint Documentation
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:

View File

@ -3,10 +3,11 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
types: [review_requested, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
jobs: jobs:
linter: linter:
if: github.event.pull_request.draft == false
name: lint name: lint
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:

View File

@ -3,10 +3,11 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
types: [review_requested, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
jobs: jobs:
testPy39: testPy310:
if: github.event.pull_request.draft == false
name: ut-${{ matrix.config.tox-env }}-${{ matrix.os }} name: ut-${{ matrix.config.tox-env }}-${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:

View File

@ -3,10 +3,11 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
types: [review_requested, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
jobs: jobs:
testPy37: testPy37:
if: github.event.pull_request.draft == false
name: ut-${{ matrix.config.tox-env }}-${{ matrix.os }} name: ut-${{ matrix.config.tox-env }}-${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:

View File

@ -3,10 +3,11 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
types: [review_requested, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
jobs: jobs:
testPy38: testPy38:
if: github.event.pull_request.draft == false
name: ut-${{ matrix.config.tox-env }}-${{ matrix.os }} name: ut-${{ matrix.config.tox-env }}-${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:

View File

@ -3,10 +3,11 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
types: [review_requested, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
jobs: jobs:
testPy39: testPy39:
if: github.event.pull_request.draft == false
name: ut-${{ matrix.config.tox-env }}-${{ matrix.os }} name: ut-${{ matrix.config.tox-env }}-${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:

View File

@ -3,10 +3,11 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
types: [review_requested, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
jobs: jobs:
typeChecking: typeChecking:
if: github.event.pull_request.draft == false
name: type-check-${{ matrix.config.python-version }} name: type-check-${{ matrix.config.python-version }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:

View File

@ -3,10 +3,11 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
types: [review_requested, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
jobs: jobs:
testsOnWindows: testsOnWindows:
if: github.event.pull_request.draft == false
name: ut-${{ matrix.config.tox-env }} name: ut-${{ matrix.config.tox-env }}
runs-on: windows-latest runs-on: windows-latest
strategy: strategy: