From 748d59cfdca0cb3a5feadc373295f8d96ae553e2 Mon Sep 17 00:00:00 2001 From: Chuck Daniels Date: Tue, 5 Nov 2024 19:03:40 -0500 Subject: [PATCH 1/2] Do not run int tests on push --- .github/workflows/integration-test.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 643e29d9..14ebf03d 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -2,15 +2,23 @@ name: Integration Tests on: pull_request: + branches: + - main + paths: + - .github/workflows/integration-test*.yml + - earthaccess/** + - scripts/integration-test.sh + - tests/** + - uv.lock pull_request_target: - push: branches: - main paths: + - .github/workflows/integration-test*.yml - earthaccess/** + - scripts/integration-test.sh - tests/** - - docs/** - - binder/** + - uv.lock # When this workflow is queued, automatically cancel any previous running # or pending jobs from the same branch @@ -33,11 +41,11 @@ jobs: # in only ONE of the following cases: # # 1. The event is NOT a pull_request (it's a pull_request_target) and the base - # repo and the head repo are different (i.e., the PR is from a fork). - # 2. The event IS a pull_request AND the base repo and head repo are the - # same (i.e., the PR is NOT from a fork). + # repo is NOT the head repo (i.e., the PR is from a fork). + # 2. The event IS a pull_request AND the base repo IS the head repo + # (i.e., the PR is not from a fork). # - if: (github.event_name != 'pull_request') && github.event.pull_request.head.repo.fork + if: (github.event_name == 'pull_request') == (github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name) runs-on: ubuntu-latest strategy: matrix: From dac2322739c7d6ddf09eacfe58dab84180071821 Mon Sep 17 00:00:00 2001 From: Chuck Daniels Date: Tue, 5 Nov 2024 19:26:54 -0500 Subject: [PATCH 2/2] Update .github/workflows/integration-test.yml Co-authored-by: Joseph H Kennedy --- .github/workflows/integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 14ebf03d..62c1043a 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -45,7 +45,7 @@ jobs: # 2. The event IS a pull_request AND the base repo IS the head repo # (i.e., the PR is not from a fork). # - if: (github.event_name == 'pull_request') == (github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name) + if: (github.event_name != 'pull_request') == github.event.pull_request.head.repo.fork runs-on: ubuntu-latest strategy: matrix: