shouldSkipFirewallWorkflow returns true if the workflow filename contains ".firewall" and the firewall feature is not enabled. This helper should be used in tests that iterate over actual workflow files in .github/workflows to skip firewall workflows when the GH_AW_FEATURES environment variable does
(workflowName string)
| 20 | // iterate over actual workflow files in .github/workflows to skip firewall workflows |
| 21 | // when the GH_AW_FEATURES environment variable doesn't include "firewall". |
| 22 | func shouldSkipFirewallWorkflow(workflowName string) bool { |
| 23 | return strings.Contains(workflowName, ".firewall") && !isFeatureEnabled(constants.FeatureFlag("firewall"), nil) |
| 24 | } |
| 25 | |
| 26 | // setupWorkflowDir creates a temporary directory with the workflows sub-directory, |
| 27 | // changes the working directory to it, and returns the path to the workflows directory. |
no test coverage detected