Eclipse-Spectrum-Theme icon indicating copy to clipboard operation
Eclipse-Spectrum-Theme copied to clipboard

Add GitHub Action for PR's

Open AObuchow opened this issue 5 years ago • 15 comments

As discussed here, it'd be nice to have some CI for pull requests.

AObuchow avatar Jun 24 '20 12:06 AObuchow

@ingomohr I'm not sure why I'm currently unable to assign you to this issue. Maybe try commenting on it?

AObuchow avatar Jun 24 '20 12:06 AObuchow

@ingomohr I'm not sure why I'm currently unable to assign you to this issue. Maybe try commenting on it?

I've read that you can assign to non-collaborators once they've posted a comment to an issue - so, maybe this one helps. :)

ingomohr avatar Jun 24 '20 19:06 ingomohr

@ingomohr there we go ;)

AObuchow avatar Jun 24 '20 20:06 AObuchow

@ingomohr there we go ;)

Nice. Didn't know that restriction, either. I thought (at first) you could only assign to collaborators - but this is nice. :)

ingomohr avatar Jun 24 '20 20:06 ingomohr

@ingomohr now that https://github.com/AObuchow/Eclipse-Spectrum-Theme/pull/90 is merged, do you think I can close this? Or do you want me to leave it open in the event you come up with a way to use a GitHub workflow for PR's directly?

AObuchow avatar Jun 26 '20 21:06 AObuchow

@ingomohr now that #90 is merged, do you think I can close this? Or do you want me to leave it open in the event you come up with a way to use a GitHub workflow for PR's directly?

Hm, maybe we can leave it open just now. Maybe there's a way to solve this, after all.

ingomohr avatar Jun 26 '20 21:06 ingomohr

But I'd be fine w/ closing, as well.

ingomohr avatar Jun 26 '20 21:06 ingomohr

@ingomohr let's leave it open then :)

AObuchow avatar Jun 26 '20 22:06 AObuchow

@ingomohr I just created a new branch and unfortunately no new update site branch was created. Maybe it has to due with the way I named the branch? https://github.com/AObuchow/Eclipse-Spectrum-Theme/blob/master/.github/workflows/build-updatesite-branches.yml#L9

AObuchow avatar Jun 28 '20 04:06 AObuchow

@ingomohr I just created a new branch and unfortunately no new update site branch was created. Maybe it has to due with the way I named the branch? https://github.com/AObuchow/Eclipse-Spectrum-Theme/blob/master/.github/workflows/build-updatesite-branches.yml#L9

@AObuchow Sorry to hear the workflow didn‘t seem to have been triggered. Did you push something to that branch? The name should not matter. For my tests I created a new branch on my machine and pushed a new commit. I‘ll be checking your branch right after breakfast.

ingomohr avatar Jun 28 '20 06:06 ingomohr

@AObuchow The „experimental“ branch has the same HEAD commit as the „master“ has. So, I think we could fix this by adding a new trigger for the workflow. There should be something like „branch created“. I‘ll create a PR for you. 😊

ingomohr avatar Jun 28 '20 06:06 ingomohr

Ahhh okay thank you for the explanation. Sure that’d be great :)

AObuchow avatar Jun 28 '20 06:06 AObuchow

Ok, here's a small update. It's possible to run the workflow when a branch has been created. - And it should be possible to add that trigger to the workflow. However, it's refused to work until now. But I'm sure I'll conquer that eventually. ;) I'll check on it later today.

ingomohr avatar Jun 28 '20 11:06 ingomohr

Some info seems to be missing. @AObuchow discussed some things via DM on Twitter.

Here's the update:

  • Updatesites are built automatically for every branch including master, now.
  • PR-updatesites are not built - and here is why:
    • The Github user who creates the PR usually doesn't have write access to the repo on which they create the PR
    • The PR cannot be built on the fork-repo either, because the PR belongs to the target repo.

Maybe we can make the PR-build on the target repo to use the user who owns the repo. I'll check on that.

ingomohr avatar Jul 12 '20 12:07 ingomohr

The PR build workflow should also merge the dev branch into the target branch (locally repo on the build machine, of course :) ) to check that...

  • a) ... the PR can be merged w/o conflicts and
  • b) ... the change won't break the target branch

The latter might not be as important right now for this repo; but p2 projects typically have tests, and a CI job (i.e. our workflow) should tell us the CI results for the target branch as it would behave after the merge of the PR.

ingomohr avatar Jul 12 '20 19:07 ingomohr