Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 215
acc: add Env setting#2772
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
Uh oh!
There was an error while loading. Please reload this page.
acc: add Env setting #2772
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -79,6 +79,12 @@ type TestConfig struct { | ||
| CompiledIgnoreObject *ignore.GitIgnore | ||
| // Environment variables | ||
| // If the same variable is defined both in Env and EnvMatrix, the one in EnvMatrix takes precedence | ||
| // regardless of which config file it is defined in. | ||
| // Note, keys are sorted alphabetically rather in order they are defined. This matter when one key reference another (same for EnvMatrix). | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: instead of commenting "(same for EnvMatrix)" here, it is better to add the same statement to the | ||
| Env map[string]string | ||
| // Environment variables matrix. | ||
| // For each key you can specify zero, one or more values. | ||
| // If you specify zero, the key is omitted, as if it was not defined at all. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| FIRST=[FIRST] | ||
| SECOND=[SECOND] | ||
| THIRD=[THIRD] | ||
| A_REGULAR_VAR=[A_REGULAR_VAR] | ||
| B_REGULAR_VAR=[B_REGULAR_VAR] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| [EnvMatrix] | ||
| B_REGULAR_VAR = ["hello"] | ||
| FIRST = ["one", "two"] | ||
| SECOND = ["variantA", "variantB"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| A_REGULAR_VAR=[A_REGULAR_VAR] | ||
| B_REGULAR_VAR=[B_REGULAR_VAR] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| echo "A_REGULAR_VAR=$A_REGULAR_VAR" | ||
| echo "B_REGULAR_VAR=$B_REGULAR_VAR" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| [Env] | ||
| A_REGULAR_VAR = "yes" | ||
| B_REGULAR_VAR = "answer:$A_REGULAR_VAR" | ||
| [EnvMatrix] | ||
| FIRST = ["overriden-in-inner"] | ||
| THIRD = ["three $FIRST"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 90% of this method deals with replacements rather than adding an a variable to an environment, could there be a more descriptive name for this method to reflect that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a very local helper, not exported function, but we can change the name if you have good ideas?