Skip to content
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

Workaround for malformed YAML when tests are disabled #458

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

dansiegel
Copy link
Contributor

GitHub Issue (If applicable): closes #

PR Type

What kind of change does this PR introduce?

  • Bugfix (Workaround)

What is the current behavior?

When someone creates a template without Unit Tests but with GitHub Actions, the generated YAML is malformed as the template engine removes most but not all of the code block for the Unit Test job.

What is the new behavior?

We now have an empty #else. The Template Engine seems to now properly box the job for the Unit Tests and include it when the condition is true and exclude it in its entirety when the condition is false.

Other information

This is a workaround. Hopefully the .NET Templating team will come up with a better long term fix for this so we can remove the hack of the empty #else

@dansiegel
Copy link
Contributor Author

@Mergifyio backport release/stable/5.0

Copy link

mergify bot commented Nov 20, 2023

backport release/stable/5.0

✅ Backports have been created

@nickrandolph nickrandolph merged commit ca5961b into main Nov 20, 2023
40 checks passed
@nickrandolph nickrandolph deleted the dev/ds/yaml-workaround branch November 20, 2023 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub CI pipeline is malformed
2 participants