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

Introduce coding standards workflow #2

Merged
merged 1 commit into from
Aug 23, 2020

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Aug 22, 2020

This is a copy of the coding standards workflow I introduced in doctrine/annotations, with a few changes:

  • consistent use of coding standards, and in case we add more jobs
  • use of actions/cache v2 (I forgot to use it in doctrine/annotations
  • I renamed the last step, which still wrongly references phpcbf

I'm deliberately naming the file with a very narrow scope, so that it's easy to enable or disable workflows based on the repository we are using.

@greg0ire

This comment has been minimized.

@greg0ire greg0ire marked this pull request as draft August 22, 2020 16:28
@greg0ire greg0ire marked this pull request as ready for review August 22, 2020 16:40
@greg0ire greg0ire force-pushed the coding-standards-workflow branch 2 times, most recently from 04a39a6 to 5ca9d55 Compare August 22, 2020 17:11
jobs:
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-20.04"
Copy link
Member Author

Choose a reason for hiding this comment

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

20.04 is documented as "preview only", apparently latest still resolves to 18.04 if we believe these docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on

Tell me if I should use 18.04 here of if you think it's fine

Copy link
Member

Choose a reason for hiding this comment

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

I preferred latest so we don't have to keep updating this string... I don't care about actual version used.

Copy link
Member

Choose a reason for hiding this comment

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

I'd try to use the newest one that works. This way, we won't have to update the workflow too soon.

Copy link
Member Author

Choose a reason for hiding this comment

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

I preferred latest so we don't have to keep updating this string

If we use templates the need to update will only be on this repo, so no longer such a big deal.

@greg0ire greg0ire merged commit 0fef9e7 into doctrine:main Aug 23, 2020
@greg0ire greg0ire deleted the coding-standards-workflow branch August 23, 2020 13:19
@greg0ire
Copy link
Member Author

Huh… turns out this whole sharing feature was not what I thought it was… looks like it is just here to help you bootstrap the action, but you still have to commit a file… and I'm not sure about what happens when you make changes upstream.
Better than nothing I suppose.

Peek 2020-08-23 15-24

@morozov
Copy link
Member

morozov commented Aug 23, 2020

I see some point in why that is. The action depends on certain APIs but doesn't own the dependency constraint, so it may be challenging to maintain it once it's shared between projects. The question is, what is the purpose of this shared workflow once all projects are on board? I.e. is there a way to synchronize them with the updates upstream? Otherwise, it may just stale overtime.

@greg0ire
Copy link
Member Author

I'm hoping to find that out by getting doctrine/annotations#357 merged and then seeing if there are any changes in the UI above. But maybe somebody well-versed in this already knows. @localheinz maybe?

@localheinz
Copy link

@greg0ire

As far as I understood, these templates are really only templates to simplify creation of workflows for repositories within an organization. As such, they do not propagate as actual workflows to repositories within an organization.

@greg0ire
Copy link
Member Author

Yes, what I'm hoping is that once you create one, it does not propose to "setup the workflow", but rather to synchronize it (by making another commit).

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