From ee8364c2164fdf1bb41130ab9d06b6cda5f2e940 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Mon, 10 May 2021 23:21:25 -0700 Subject: [PATCH] Only run mypy primer workflows on stdlib (#5407) Co-authored-by: hauntsaninja <> --- .github/workflows/mypy_primer.yml | 4 ++++ .github/workflows/mypy_primer_comment.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index ea23cbe49..4e14b0c97 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -3,6 +3,10 @@ name: Run mypy_primer on: # Only run on PR, since we diff against master pull_request: + # Since modular typeshed, mypy primer doesn't check third party stubs. Till that is changed, + # only run it on stdlib changes to avoid false confidence and wasted CI minutes. + paths: + - stdlib permissions: contents: read diff --git a/.github/workflows/mypy_primer_comment.yml b/.github/workflows/mypy_primer_comment.yml index 661f4cd42..04982e6a1 100644 --- a/.github/workflows/mypy_primer_comment.yml +++ b/.github/workflows/mypy_primer_comment.yml @@ -7,6 +7,10 @@ on: # each other, so the approach here is to poll for workflow runs, find the mypy_primer run for our # commit, wait till it's completed, and download and post the diff. pull_request_target: + # Since modular typeshed, mypy primer doesn't check third party stubs. Till that is changed, + # only run it on stdlib changes to avoid false confidence and wasted CI minutes. + paths: + - stdlib permissions: contents: read