opentelemetry-python-contrib icon indicating copy to clipboard operation
opentelemetry-python-contrib copied to clipboard

Generate workflow files with a Jinja template

Open ocelotl opened this issue 1 year ago • 1 comments
trafficstars

Fixes #2686

The idea behind this PR is to delete our current test and lint workflow files and replace them with automatically generated workflow files.

This automatically generated file gets its information directly from tox.ini, removing the duplication of test running information in tox.ini and in the Github workflow files.

To achieve this, I have added a Jinja2 template that is used to generate the new workflow file. The resulting workflow file does not use a Github matrix. This is intentional, a Github matrix only supports 256 jobs, which had forced us to have 2 almost identical workflow files. With this new approach we only need one huge file.

I also cleaned up the information that is displayed in the web browser, so jobs now have more user-friendly names.

I also added a check that makes sure that the automatically generated workflow file is up to date with every PR that modifies the automatically generated workflow files so that we don't miss adding any necessary changes to this file.

I also removed the step where we cache the tox environment. Since every tox run happens in a separate runner, I think there is no point in saving this cache.

ocelotl avatar Jul 10 '24 02:07 ocelotl