From 2459a2fb7edb1bee60e8e1343d6c761d18918e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Lehmann?= Date: Fri, 5 Sep 2025 22:24:40 +0200 Subject: [PATCH] ci: run tests on PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the checks were only run on branches pushed to the xcp-ng repo, or, when a branch is pushed to a forked repo, against that fork, if it has been configured to run GH actions. This resulted in PRs for branches in a forked repo not to trigger the test actions, and we would miss any regression while the PR is open, and only get hit when the regression hits master. Just activating those actions on pull_request in addition to push would OTOH have them run twice when we push a PR branch, so we restrict the runs on push to only happen when pushing to master. This has a side-effect of non-PR branches not getting the checks run, which we may want to fix in the future. Co-authored-by: Yann Dirson Signed-off-by: Gaëtan Lehmann --- .github/workflows/code-checkers.yml | 6 +++++- .github/workflows/requirements-check.yml | 6 +++++- .github/workflows/zizmor.yml | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-checkers.yml b/.github/workflows/code-checkers.yml index 1ac300e..c266d15 100644 --- a/.github/workflows/code-checkers.yml +++ b/.github/workflows/code-checkers.yml @@ -1,6 +1,10 @@ name: Static code checkers -on: [push] +on: + push: + branches: + - 'master' + pull_request: permissions: {} diff --git a/.github/workflows/requirements-check.yml b/.github/workflows/requirements-check.yml index d96f05e..34b9ec1 100644 --- a/.github/workflows/requirements-check.yml +++ b/.github/workflows/requirements-check.yml @@ -1,6 +1,10 @@ name: Check requirements file consistency -on: [push] +on: + push: + branches: + - 'master' + pull_request: permissions: {} diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 13711b2..acf9d82 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -1,6 +1,10 @@ name: GitHub Actions Security Analysis with zizmor 🌈 -on: [push] +on: + push: + branches: + - 'master' + pull_request: permissions: {}