Skip to content

Commit

Permalink
run only on external prs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcflugen committed Oct 10, 2024
1 parent e28d8a7 commit 6314c78
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
echo "publish_url=$publish_url"
build-sdist:
# Run on external PRs, but not on internal PRs, to avoid duplicate runs
if: |
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name != github.repository
name: Build source distribution
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -69,13 +74,6 @@ jobs:
build-with-conda:
name: Test with conda
needs: build-sdist
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. Without this if check, checks are duplicated since
# internal PRs match both the push and pull_request events.
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

runs-on: ${{ matrix.os }}

defaults:
Expand Down

0 comments on commit 6314c78

Please sign in to comment.