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

🤖 Have linting and make it required on every one of Kairos repositories #1234

Open
20 tasks
mauromorales opened this issue Mar 31, 2023 · 9 comments
Open
20 tasks
Labels

Comments

@mauromorales
Copy link
Member

mauromorales commented Mar 31, 2023

Standards applied on the Kairos main repo should also be required on every other repository. There will be linting steps that might not make sense, those can be ignored, but we should to have this as a standard of our different codebases.

@Itxaka
Copy link
Member

Itxaka commented Mar 31, 2023

Maybe we could have an action that runs our generic linters so it can be reused in all repos?
That would make everything more centralized and kept all repos in sync?

@mudler
Copy link
Member

mudler commented Mar 31, 2023

A small sample of a composite action (that we already use) https://github.com/Luet-lab/luet-install-action

@mauromorales
Copy link
Member Author

ohh I like the idea, thanks for sharing guys

@jimmykarily jimmykarily self-assigned this Apr 25, 2023
@jimmykarily
Copy link
Contributor

Created a new repo for the action here: https://github.com/kairos-io/linting-composite-action

@mauromorales
Copy link
Member Author

@jimmykarily there's already https://github.com/kairos-io/kairos-linter sorry that I didn't put it here in the ticket. We can use either or, no preference for me but I had already done some progress on the one I mention

@jimmykarily
Copy link
Contributor

Oops 🤦‍♂️ . I started with the same approach by using an Earthfile but then I couldn't find a way to tell Earthly "here is the Earthfile, here is the context dir" like you can do with docker.
Then the problem was that the directory of the action is not the one of the checkout (I think). Anyway, I found it relatively easy to simply run with docker: https://github.com/kairos-io/linting-composite-action/blob/main/action.yml

Let's sync tomorrow

@jimmykarily
Copy link
Contributor

jimmykarily commented Apr 25, 2023

I also think we may need a "reusable workflow" instead of a "composite action" so that all our checks run and it doesn't stop on the first one that failed (as it happened here for example). For that to happen, we need to be able to define "jobs" instead of "steps".

See here: https://dev.to/n3wt0n/composite-actions-vs-reusable-workflows-what-is-the-difference-github-actions-11kd

@jimmykarily
Copy link
Contributor

I created a reusable workflow here: https://github.com/kairos-io/linting-composite-action/blob/main/.github/workflows/reusable-linting.yaml

and tried it out here: spectrocloud/peg#17

It seems to be working fine!

@mauromorales
Copy link
Member Author

Very nice, I'll remove the other repo

jimmykarily added a commit that referenced this issue May 3, 2023
part of: #1234

Signed-off-by: Dimitris Karakasilis <[email protected]>
jimmykarily added a commit that referenced this issue May 9, 2023
jimmykarily added a commit that referenced this issue May 9, 2023
Consume reusable linting workflow and fix linting errors

part of: #1234

Signed-off-by: Dimitris Karakasilis <[email protected]>
jimmykarily added a commit to kairos-io/provider-kairos that referenced this issue May 9, 2023
as part of kairos-io/kairos#1234

Signed-off-by: Dimitris Karakasilis <[email protected]>
jimmykarily added a commit to kairos-io/provider-kairos that referenced this issue May 19, 2023
as part of kairos-io/kairos#1234

Signed-off-by: Dimitris Karakasilis <[email protected]>
jimmykarily added a commit to kairos-io/provider-kairos that referenced this issue May 19, 2023
as part of kairos-io/kairos#1234

---------

Signed-off-by: Dimitris Karakasilis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

4 participants