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

ci: Reduce redundancy by using workflows templates #3610

Closed

Conversation

jlabatut
Copy link
Contributor

Description

This PR aims to reduce redundancy in CI workflows by using workflows templates (e.g. : setting up Node/Yarn).

Issues Resolved

Closes #3603

Check List

  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: Julian Labatut <julian.labatut@etu.umontpellier.fr>
@jlabatut jlabatut requested a review from a team as a code owner March 14, 2023 20:33
@jlabatut
Copy link
Contributor Author

From what I understand (https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow), the CI cannot find the template workflow since it is supposed to be called directly within a job, and not from within job steps.
But I cannot figure out how the next jobs could use the previously executed template job (setup Node/Yarn).

@kavilla
Copy link
Member

kavilla commented Mar 16, 2023

Thanks for tackling this!

From what I understand (https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow), the CI cannot find the template workflow since it is supposed to be called directly within a job, and not from within job steps. But I cannot figure out how the next jobs could use the previously executed template job (setup Node/Yarn).

Correct. What I would suggest is keeping the actual setup and execution of stuff together.

Not saying this is the only solution but one proposal can be like:

  • build_and_test_workflow_template
  • Then we pass flags like linux in

Another one could be like having

  • unit_test_template
  • integration_test_template
  • functional_test_template
    That all setup their dependencies.

That then get called with flags from a build_and_test_workflow

We can also take it one step further and pull out the build and cypress tests.

  • build_test
  • cypress_test

@kavilla kavilla marked this pull request as draft April 11, 2023 17:39
@kavilla
Copy link
Member

kavilla commented Apr 11, 2023

Converting to draft. Please feel free to open when changes made.

@ananzh
Copy link
Member

ananzh commented Jul 25, 2024

@jlabatut Due to an extended period without updates, we're going to close this issue for now. We appreciate your contribution and understand that priorities and availability can change. Please feel free to reopen this issue when you have the opportunity to revisit it. Thank you for your understanding.

@ananzh ananzh closed this Jul 25, 2024
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.

[CI] Create workflows templates
3 participants