From 7a9944a21be995dfe359684cfa9f37247548bc53 Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Wed, 14 Feb 2024 12:49:24 -0500 Subject: [PATCH] CI: Do not run tests twice on a PR from the same repo's branch --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45f3bcf..68bfe14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,11 @@ jobs: pipx run nox -s pylint checks: + # pull requests are a duplicate of a branch push if within the same repo. + if: + github.event_name != 'pull_request' || + github.event.pull_request.head.repo.full_name != github.repository + name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }} needs: [pre-commit]