From a3c53e4dababcdeb45c7cf55d7e804160b01b201 Mon Sep 17 00:00:00 2001 From: Eric Willigers Date: Wed, 2 Dec 2026 13:13:47 +1100 Subject: [PATCH] Testing CI: don't run on pushes to forks --- .github/workflows/tests.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6018efbd..aeb53f80 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,9 +1,12 @@ name: Testing CI on: push: + branches: + - main pull_request: branches: - main + workflow_dispatch: jobs: test-exercises: @@ -11,6 +14,8 @@ jobs: matrix: os: [ubuntu-26.04, macos-15, windows-2022] + # Pushes run the tests only on exercism/zig, not on forks. Pull requests and manual runs always do. + if: github.event_name != 'push' || github.repository_owner == 'exercism' name: Check exercises (${{ matrix.os }}) runs-on: ${{ matrix.os }} steps: @@ -28,7 +33,7 @@ jobs: tests: name: Tests needs: test-exercises - if: always() + if: always() && (github.event_name != 'push' || github.repository_owner == 'exercism') runs-on: ubuntu-26.04 steps: - name: Check that every configuration passed