Jobs : matrix : # see above check-matrix : # see above backend : needs : matrix strategy : fail-fast : false matrix : $ # rest unchanged In DBItest, we test the compatibility of new or updated tests with backend packages.Įach backend is run in a build matrix, which is defined as follows: This blog post gives a walkthrough of how I converted a static to a dynamic build matrix in the DBItest project. The original blog post contains a somewhat brief description. The basic setup comprises of two jobs: one that creates the workflow definition as JSON and stores it as output, and another dependent job that injects this output via fromJSON() into its matrix definition.Ī third job is defined for testing if outputs are passed correctly between jobs. fromJSON() allows injecting arbitrary configuration pieces created from JSON code.toJSON() can capture pieces of the workflow configuration as JSON and pass it to your workflow code.Two very powerful functions are toJSON() and fromJSON(): The configuration for a workflow is a YAML file that has a context and expression syntax with very few basic functions. This blog post shows how to define these build matrices dynamically so that the “source of truth” for the matrix definition is outside the. Usually, a build matrix is defined directly in the. GitHub Actions allows automating build and deployment processes (CI/CD), tightly integrated with GitHub.Ī build matrix is a way to define very similar workflows that differ only by configuration parameters. I wanted to try out the new fromJSON() that allows dynamic build matrices in GitHub Actions for quite some time now.
0 Comments
Leave a Reply. |