unitaryfund / mitiq

Mitiq is an open source toolkit for implementing error mitigation techniques on most current intermediate-scale quantum computers.
https://mitiq.readthedocs.io
GNU General Public License v3.0
358 stars 157 forks source link

Add continuous integration from github action on pull request from fork #49

Closed nathanshammah closed 4 years ago

nathanshammah commented 4 years ago

In PR #47 tests are not run. Tests are run using GitHub actions. As suggested by @andreamari, it looks like this is due to the fact that #47 is a made from a fork of unitaryfund/mitiq.

As pointed out by @willzeng, this should be addressed by editing the continuous integration (CI) workflow.

I can set this up in my fork, but also for the future (external collaborators or forks) I think it's most straightforward to set this up in the generic way. It may be that

on: [push]

in .github/workflows/ci.yml is not enough to trigger the test. It may be that

on: [push, pull_request]

would work.

If I understand correctly, there can be even more general events that trigger the CI, as a pull_request_review, which looks useful.

I can change the ci.yml file. I also need to become familiar with webhooks.

willzeng commented 4 years ago

I think this was closed by #50 ? If that is not the case @nathanshammah please re-open

nathanshammah commented 4 years ago

I think this feature is now not working since the repository became private, as in #59. But I see that the organization is already billed with the "GitHub Team" package, which should include CI time for Github Actions on private repositories, which are not used, https://github.com/organizations/unitaryfund/settings/billing. So I am not sure on why in #59 the Github actions were not triggered. Curious to see if it is because it is a fork. Also, on https://github.com/unitaryfund/mitiq/settings/actions it seems that Actions are enabled. I will try to prompt the actions on my fork too.

nathanshammah commented 4 years ago

This is currently an open issue and a source of complaint from part of the community, as many orgs would like to enable tests in CI run from private forks of private repos.

There are some security concerns on malicious behavior from contributors, but as pointed out, this would have to come from collaborators that have been granted the trust to have access.

I proposed in the discussion to enable organization members to have such privilege.

Meanwhile, I will git clone directly the org master branch, but I do not find it the best way to contribute, in general.

willzeng commented 4 years ago

Got it. Thanks for the update. We'll monitor to see if the feature is introduced.

On Sun, Mar 29, 2020 at 9:57 AM Nathan Shammah notifications@github.com wrote:

This is currently an open issue https://github.community/t5/GitHub-Actions/Will-GitHub-Actions-support-pull-request-events-from-a-fork-to-a/td-p/44488 and a source of complaint from part of the community, as many orgs would like to enable tests in CI run from private forks of private repos.

There are some security concerns https://github.community/t5/GitHub-Actions/Will-GitHub-Actions-support-pull-request-events-from-a-fork-to-a/m-p/47975#M7029 on malicious behavior from contributors, but as pointed out https://github.community/t5/GitHub-Actions/Will-GitHub-Actions-support-pull-request-events-from-a-fork-to-a/m-p/49158#M7396, this would have to come from collaborators that have been granted the trust to have access.

I proposed https://github.community/t5/GitHub-Actions/Will-GitHub-Actions-support-pull-request-events-from-a-fork-to-a/m-p/51779#M8300 in the discussion to enable organization members to have such privilege.

Meanwhile, I will git clone directly the org master branch, but I do not find it the best way to contribute, in general.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/unitaryfund/mitiq/issues/49#issuecomment-605639933, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHZDAR7KG3PK5RKRNZNNUDRJ5HTPANCNFSM4LPVZN2A .

-- https://unitary.fund/ Creating a quantum technology ecosystem that benefits the most people.