cisagov / ScubaGear

Automation to assess the state of your M365 tenant against CISA's baselines
https://www.cisa.gov/resources-tools/services/secure-cloud-business-applications-scuba-project
Creative Commons Zero v1.0 Universal
1.44k stars 203 forks source link

Create workflow unit test pattern #1172

Closed james-garriss closed 1 day ago

james-garriss commented 1 week ago

🗣 Description

The purpose of this PR was simply to create a pattern for unit testing code in workflows. It extracted some (fairly simple) code in the nightly product functional testing, created standalone files with that code, called that code from workflow, created unit tests for those files, and then created a new workflow that runs the unit tests. As this was successful, this is the pattern that will be followed for unit testing all workflow code; in particular, it will be used to improve the quality of the deployment code.

💭 Motivation and context

Closes: #1164

🧪 Testing

✅ Pre-approval checklist

Mostly. I did delete one random Markdown file that was incorporated into Nanda's testing README but hadn't been deleted.

✅ Pre-merge checklist

✅ Post-merge checklist

james-garriss commented 5 days ago

@nanda-katikaneni , this one is ready.