You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.
There are many cases where what you want to define is "everything the same for each of these [X] actions, but change this one thing".
Ideally, this should not require someone to re-write the entire action definition, but instead simply provide some syntax to expand.
Some prior art for this type of behavior includes Tox's factor expansion[1] and Travis CI's build matrix[2].
There are a few different options that I am considering for how to support this.
We need to determine what route we want to take here and how to approach that.
List Expansion
List expansion works similarly to Tox's factor expansion.
If a string that is a member of a list contains values enclosed by braces, that string is removed from the list and replaced with a member for each possible combination of values defined in the original string.
List expansion is more like an in-line version of Travis CI's build matrix.
Any values that expect strings and are provided lists of strings are used to all possible combinations.
# Sourceexample:
name: MyNamevalue:
- value 1
- value 2another:
- value 3
- value 4# Resultexample:
-
name: MyNamevalue: value 1another: value 3
-
name: MyNamevalue: value 1another: value 4
-
name: MyNamevalue: value 2another: value 3
-
name: MyNamevalue: value 2another: value 3
Template Definitions
Provide a way of defining an action template, then provide an action plugin (dependent on #27) that takes a template name an a list of values.
There are many cases where what you want to define is "everything the same for each of these [X] actions, but change this one thing".
Ideally, this should not require someone to re-write the entire action definition, but instead simply provide some syntax to expand.
Some prior art for this type of behavior includes Tox's factor expansion[1] and Travis CI's build matrix[2].
There are a few different options that I am considering for how to support this.
We need to determine what route we want to take here and how to approach that.
List Expansion
List expansion works similarly to Tox's factor expansion.
If a string that is a member of a list contains values enclosed by braces, that string is removed from the list and replaced with a member for each possible combination of values defined in the original string.
List Expansion
List expansion is more like an in-line version of Travis CI's build matrix.
Any values that expect strings and are provided lists of strings are used to all possible combinations.
Template Definitions
Provide a way of defining an action template, then provide an action plugin (dependent on #27) that takes a template name an a list of values.
[1] https://tox.readthedocs.io/en/latest/config.html#complex-factor-conditions
[2] https://docs.travis-ci.com/user/build-matrix/
The text was updated successfully, but these errors were encountered: