OU-1472: run only changed tests - #1134
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@PeterYurkovich: This pull request references OU-1472 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: PeterYurkovich The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
4e1102d to
3335c07
Compare
3335c07 to
217d32c
Compare
| @@ -0,0 +1,62 @@ | |||
| #!/bin/bash | |||
|
|
|||
| CHANGED_FILES=$(git diff --name-only origin/main...HEAD) | |||
There was a problem hiding this comment.
The target branch might be different we should provide it from env defaulting to main
There was a problem hiding this comment.
we should add error handling, in shallow checkouts the main branch might not exist.
| "test-cypress-perses-dev": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@perses-dashboards --@xfail'", | ||
| "test-cypress-perses": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@perses-dashboards --@smoke --@flaky --@xfail'", | ||
| "test-cypress-perses-ivt": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@perses-dashboards --@smoke --@flaky --@xfail'", | ||
| "test-cypress-monitoring": "../scripts/run-selective-e2e.sh", |
There was a problem hiding this comment.
Is this script in a different PR or should be ./cypress/run-changed.sh
| if [ "$RUN_ALL" = true ]; then | ||
| echo "Changes affect global scope or unmapped features. Running ALL monitoring tests..." | ||
|
|
||
| DEFAULT_TAGS="@alerting @legacy-dashboards @metrics @targets acm-alerting @cluster-health-analyzer @perses-dashboards --@flaky --@xfail" |
There was a problem hiding this comment.
| DEFAULT_TAGS="@alerting @legacy-dashboards @metrics @targets acm-alerting @cluster-health-analyzer @perses-dashboards --@flaky --@xfail" | |
| DEFAULT_TAGS="@alerting @legacy-dashboards @metrics @targets @acm-alerting @cluster-health-analyzer @perses-dashboards --@flaky --@xfail" |
| "test": "npm run cypress:run:ci", | ||
| "test-cypress-console": "./node_modules/.bin/cypress open --browser chrome", | ||
| "test-cypress-console-headless": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless", | ||
| "test-cypress-monitoring": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run --browser chrome --headless --env grepTags='@alerting+@legacy-dashboards+@metrics+@targets --@flaky --@xfail'", |
There was a problem hiding this comment.
Do we need to update the cypress docs with these removals?
| CHANGED_FILES=$(git diff --name-only origin/main...HEAD) | ||
|
|
||
| RUN_ALL=false | ||
| declare -A TAGS_TO_RUN |
There was a problem hiding this comment.
We might need to change this into something POSIX compatible, I got the following issue while trying to run on mac:
./cypress/run-changed.sh: line 6: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
| done | ||
|
|
||
| if [ "$RUN_ALL" = true ]; then | ||
| echo "Changes affect global scope or unmapped features. Running ALL monitoring tests..." |
There was a problem hiding this comment.
unmapped features already exits
| echo "Changes affect global scope or unmapped features. Running ALL monitoring tests..." | |
| echo "Changes affect global scope. Running ALL monitoring tests..." |
| FEATURE_MAP["perses-dashboards"]="@perses-dashboards" | ||
| FEATURE_MAP["targets"]="@targets" | ||
|
|
||
| for FILE in $CHANGED_FILES; do |
There was a problem hiding this comment.
not sure if we have file paths with white spaces, but this will split on white space
2c3cc81 to
88ad602
Compare
88ad602 to
49d7ac8
Compare
Stack created with GitHub Stacks CLI • Give Feedback 💬