Skip to content

ci: add reusable workflows #1

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

Merged
merged 23 commits into from
Nov 30, 2021
Merged

ci: add reusable workflows #1

merged 23 commits into from
Nov 30, 2021

Conversation

umarcor
Copy link
Member

@umarcor umarcor commented Nov 27, 2021

This PR adds 11 reusable workflows, based on the jobs used in repos from this organisation, EDA², VHDL, and others.

The expected order is:

  • Params.yml
  • UnitTesting.yml
  • CoverageCollection.yml
  • StaticTypeCheck.yml
  • Release.yml
  • Package.yml
  • PublishOnPyPI.yml
  • VerifyDocs.yml
  • BuildTheDocs.yml
  • PublishToGitHubPages.yml
  • ArtifactCleanUp

Moreover, an example workflow named ExamplePipeline.yml is provided, for tool developers to copy it into their repos. The only required modification should be setting the name input of job Params.

IMPORTANT: reusable workflows must be used through an absolute name and specifying a version (see actions/runner#1493). Therefore, this PR will be kept as a draft, because s/@dev/@main/ is required in ExamplePipeline.yml before merging.

@umarcor
Copy link
Member Author

umarcor commented Nov 29, 2021

@Paebbels, as discussed in the meeting, I did several enhancements to this PR:

  • rename 'pyver' to 'python_version'
  • add option 'requirements' to Package, PublishOnPyPI, StaticTypeCheck, UnitTesting and CoverageCollection.
  • update StaticTypeCheck to make the html report optional and to accept mypy args (instead of just the package name).
  • do not delete the wheel/dist artifact in job PublishOnPyPI.
  • generate matrix/list of jobs for UnitTesting dynamically (in job Params). allow overriding it by providing a list of space separated versions.

Furthermore, I updated the example pipeline, to show all the required and optional inputs.

This is currently tested in three repos:

@umarcor umarcor force-pushed the dev branch 5 times, most recently from 9fcb656 to 6b870ff Compare November 29, 2021 23:15
@umarcor
Copy link
Member Author

umarcor commented Nov 29, 2021

Since the ArtifactCleanUp job now has more than one step, I created a reusable workflow. I tested it in pyEDAA.ProjectModel, successfully.

I changed s/@dev/@main/ in ExamplePipeline.yml. So, I think this is ready to merge.

@umarcor umarcor marked this pull request as ready for review November 29, 2021 23:48
@Paebbels Paebbels merged commit 2b09163 into main Nov 30, 2021
@umarcor umarcor added the Enhancement New feature or request label Nov 30, 2021
@umarcor umarcor added CI: GitHub Actions Continuous Integration issues related to GitHub Actions (Windows, Linux and MacOS) Pipeline Reusable workflows labels Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: GitHub Actions Continuous Integration issues related to GitHub Actions (Windows, Linux and MacOS) Enhancement New feature or request Pipeline Reusable workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants