From 89d78c982eff33d0cba5786aaffa5e53dd5df419 Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Mon, 13 Jan 2025 21:06:54 -0500 Subject: [PATCH] CI trigger test runs on pull requests events This changes CI tests to trigger on pull requests events, or when pushed to main. This has the following benefits: - tests are run on the merged state of the target branch so can capture conflicting changes earlier - forks from third party contributors will now have tests run as part of the PR workflow --- .github/workflows/buf-binary-size.yaml | 6 +++++- .github/workflows/ci.yaml | 6 +++++- .github/workflows/previous.yaml | 6 +++++- .github/workflows/windows.yaml | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/buf-binary-size.yaml b/.github/workflows/buf-binary-size.yaml index 6276a34f4f..a5a3edb434 100644 --- a/.github/workflows/buf-binary-size.yaml +++ b/.github/workflows/buf-binary-size.yaml @@ -1,5 +1,9 @@ name: binary-size -on: push +on: + push: + branches: + - main + pull_request: # Prevent writing to the repository using the CI token. # Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions permissions: read-all diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6eee11c16d..ca7464b3c7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,5 +1,9 @@ name: ci -on: push +on: + push: + branches: + - main + pull_request: # Prevent writing to the repository using the CI token. # Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions permissions: read-all diff --git a/.github/workflows/previous.yaml b/.github/workflows/previous.yaml index 06b11bbc87..a4e5c872f5 100644 --- a/.github/workflows/previous.yaml +++ b/.github/workflows/previous.yaml @@ -1,5 +1,9 @@ name: previous -on: push +on: + push: + branches: + - main + pull_request: # Prevent writing to the repository using the CI token. # Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions permissions: read-all diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 1b1b6b2f3f..5207ece010 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -1,5 +1,9 @@ name: windows -on: push +on: + push: + branches: + - main + pull_request: # Prevent writing to the repository using the CI token. # Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions permissions: read-all