Update example code tests to run on PRs #13244
Labels
area/site
Issues and feature enhancement requests for pulumi.com/docs.
kind/engineering
Work that is not visible to an external user
kind/enhancement
Improvements or new features
There are a few alterations we should make to the testing of the example code under static/programs/ in order to make it easier to use. Right now people can run the test script locally to test their code if they really wanted to, but it assumes you have everything installed to run all the languages as well as the correct versions of the dependencies which most of us do not. This makes it difficult to use and configure locally for our contributors. Currently the tests are just a daily cron job that runs after the code has been merges as it only runs against master, so it would be better if we caught anything that causes the tests to fail at PR time. We should still continue to run them daily that way we can find out if any of them start to fail for other reasons outside of code compilation, so this behavior should be retained.
I want to get the tests running automatically in the pipeline when a PR is opened so that the contributor can get feedback right away if the code they updated doesn't work and that way they can view the error logs and can troubleshoot for themselves why the test failed without needing to worry about a lot of local configuration. It will also act as a guard rail to prevent it from being merged if the code doesn't pass.
The tests should only run if there is a diff to any files in the static/programs directory. It takes about a half hour to run so we don't want them running on all PRs - only the PRs that have changes to the example code.
The text was updated successfully, but these errors were encountered: