Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action to run the tests on every pull request #17

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Mar 6, 2024

@MattijsKneppers
Copy link
Contributor

Thank you for this PR @cclauss, which immediately points out a flaw in the tests that was introduced some time ago (now fixed with #19). We're looking into this PR and get back to you.

@cclauss
Copy link
Contributor Author

cclauss commented Mar 6, 2024

Rebased to the main branch just to prove that #19 fixed the tests.

.github/workflows/ci.yml Show resolved Hide resolved
@@ -0,0 +1,23 @@
name: test
on:
push:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you agree that it is not necessary to run the tests for every Push action, but only as a required check before merging?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually looking to see if anyone had already done something like this for PRs. Would be most handy. I agree checking every push is unnecessary right now, and just making sure tests pass for each PR would be ideal.

Copy link
Contributor Author

@cclauss cclauss Apr 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub's Python docs seem to favor on: [push] but I am flexible.

It is useful if contributors and reviewers can see the tests pass before starting the code review.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cclauss. I am not very familiar with setting up github checks, so do I understand correctly that having them on push would re-trigger the checks on every push? In that case I agree having them on push makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified to just on: [push].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cclauss
Copy link
Contributor Author

cclauss commented Apr 22, 2024

If you are going to run prbase then you should probably enable contributors to rebase their PRs on the current branch.

@MattijsKneppers
Copy link
Contributor

@cclauss thanks for all the updates. I requested for rebasing to be enabled and will let you know when that has happened.

In the mean time, I wonder if you have noticed the requirement in the contributing guidelines that Ableton has received a CLA from any contributors. Would you be able to submit one for us?

@cclauss
Copy link
Contributor Author

cclauss commented Apr 22, 2024

Done.

@@ -0,0 +1,17 @@
name: test
on: [push]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means the workflow will trigger when a branch in this repository (not in a fork) is pushed to. So when an external contributor opens a new pull request, it won't trigger the workflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to follow the factory-boy example.

Copy link
Contributor

@MattijsKneppers MattijsKneppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cclauss, we had another look and have a few questions:

  • it looks like pull_request needs to be pull_request_target in order to run from forks, would you be able to change that?
  • nitpick:
    • since we're only testing a single python version, perhaps having the matrix entry is not needed and the 3.x version can just be in-lined in python-version: ${{ matrix.python-version }}.
    • OR: since ubuntu-latest already comes with python 3.10.x, perhaps actions/setup-python@v5 is not needed at all.

Thanks again for your ongoing attention to this!

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@cclauss
Copy link
Contributor Author

cclauss commented Apr 30, 2024

Do these three suggestions cover it?

@MattijsKneppers
Copy link
Contributor

@cclauss they do, thank you!

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@MattijsKneppers
Copy link
Contributor

Hi @cclauss, sorry for the long wait. We needed a bit more discussion, but it's all approved now. It would be great if you can rebase one last time and then I can merge.

@cclauss
Copy link
Contributor Author

cclauss commented Jun 13, 2024

Rebased.

Copy link

@ala-ableton ala-ableton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current state of .github/workflows/ci.yml is an old state, and is not what we want to merge to this repository. Please restore the state that was in 4fc0a77.

@MattijsKneppers MattijsKneppers merged commit 0dd97ee into Ableton:main Jun 17, 2024
2 checks passed
@cclauss cclauss deleted the patch-1 branch June 17, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants