Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 5, 2025

GitHub Actions workflows were running twice on PRs: once for the push event to the PR branch and once for the pull_request event, causing duplicate checks like "CI / macOS Latest (push)" and "CI / macOS Latest (pull_request)".

Changes

Updated workflow triggers in 4 files to run on push only for the master branch:

  • .github/workflows/ci.yml
  • .github/workflows/python_binding.yml
  • .github/workflows/memcheck.yml
  • .github/workflows/benchmark.yml

Before:

on: [push, pull_request]

After:

on:
  push:
    branches:
      - master
  pull_request:

PRs now trigger workflows once via pull_request event. Direct pushes to master still trigger via push event.

Original prompt

This section details on the original issue you should resolve

<issue_title>[bug] needs to fix CI for strange duplicated checks in PR</issue_title>
<issue_description>The following duplicated CI checks ran in this open PR: #258

[CI / macOS Latest (pull_request)](https://github.com/casbin/casbin-cpp/actions/runs/19098521569/job/54571609532?pr=258)
CI / macOS Latest (pull_request)Failing after 21s
[CI / macOS Latest (push)](https://github.com/casbin/casbin-cpp/actions/runs/19098520831/job/54571609184?pr=258)
CI / macOS Latest (push)Failing after 18s
[Python Bindings Test / build (macos-latest, 3.8) (pull_request)](https://github.com/casbin/casbin-cpp/actions/runs/19098521581/job/54571609060?pr=258)
Python Bindings Test / build (macos-latest, 3.8) (pull_request)Failing after 1m
[Python Bindings Test / build (macos-latest, 3.8) (push)](https://github.com/casbin/casbin-cpp/actions/runs/19098520807/job/54571608791?pr=258)
Python Bindings Test / build (macos-latest, 3.8) (push)Failing after 1m
[Python Bindings Test / build (macos-latest, 3.10) (pull_request)](https://github.com/casbin/casbin-cpp/actions/runs/19098521581/job/54571609067?pr=258)
Python Bindings Test / build (macos-latest, 3.10) (pull_request)Failing after 50s
[Python Bindings Test / build (macos-latest, 3.10) (push)](https://github.com/casbin/casbin-cpp/actions/runs/19098520807/job/54571608773?pr=258)
Python Bindings Test / build (macos-latest, 3.10) (push)Failing after 37s

I think for an open state PR, it should not run "XXX (push)" checks, right? It should run for the git push after PR merge?
Need to fix the CI.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@hsluoyz hsluoyz marked this pull request as ready for review November 5, 2025 11:39
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI for duplicated checks in PR Fix duplicate CI workflow runs on pull requests Nov 5, 2025
Copilot AI requested a review from hsluoyz November 5, 2025 11:45
@hsluoyz hsluoyz changed the title Fix duplicate CI workflow runs on pull requests feat: fix duplicate CI workflow runs on pull requests Nov 5, 2025
@hsluoyz hsluoyz merged commit 3c8c9d6 into master Nov 5, 2025
9 of 14 checks passed
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

🎉 This PR is included in version 1.63.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] needs to fix CI for strange duplicated checks in PR

3 participants