-
Notifications
You must be signed in to change notification settings - Fork 409
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
feat: Enable skip of CI deployment tests #4203
base: main
Are you sure you want to change the base?
feat: Enable skip of CI deployment tests #4203
Conversation
@@ -213,7 +213,39 @@ runs: | |||
|
|||
# [Deployment validation] task(s) | |||
# ------------------------------- | |||
- name: "Validate Test Execution" |
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.
Wondering if we could skip the whole job instead of singular steps
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.
Unfortunately, we can't. I moved the ignore check to the top of the steps, so it will "stop" earlier. Skipping a matrix job is not possible. We could implement another job before this one, to modify the tests-list input in order to only execute the non-skipped tests. But with that, the test would vanish completely from the list.
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.
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.
This is not possible, unfortunately. The skipping condition is only available in a step within the job. Not before :-(
@@ -180,3 +180,4 @@ | |||
/avm/res/web/static-site/ @Azure/avm-res-web-staticsite-module-owners-bicep @Azure/avm-module-reviewers-bicep | |||
/avm/utl/types/avm-common-types/ @Azure/avm-utl-types-avmcommontypes-module-owners-bicep @Azure/avm-module-reviewers-bicep | |||
*avm.core.team.tests.ps1 @Azure/avm-core-team-technical-bicep | |||
*.e2eignore @Azure/avm-core-team-technical-bicep |
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.
Looking forward to discussing, great work meanwhile!
The main suggestion I'd have for now is to add tests. At least one pipeline run with one deployment test skipped and one base case pipeline with no test skipped
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.
Thanks @eriqua.
I am not sure I understand your remark. You mean we should have a failed test before the test can be excluded?
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.
Hi @ReneHezser exactly, suggested full test coverage for CI updates before they are introduced.
- Static validation: we introduced 2 pester tests so we need:
- module run with no test skipped --> should pass
- module run where deployment tests are skipped as intended--> should pass
- module run with one test skipped incorrectly (.e2eignore added in defaults or waf-aligned test) --> should fail pester test 1
- module run with one test skipped incorrectly (.e2eignore is empty) --> should fail pester test 2
Description
Allow testcases to be excluded from deplyoments by the CI deployment.
Azure/Azure-Verified-Modules#1796
Pipeline Reference
Type of Change
version.json
:version.json
.version.json
.Checklist
Set-AVMModule
locally to generate the supporting module files.