-
Notifications
You must be signed in to change notification settings - Fork 11
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
Added major Tagged Test Filter configurations #639
base: main
Are you sure you want to change the base?
Conversation
7011fcd
to
b519f40
Compare
Npm packages
|
.github/workflows/ci.yml
Outdated
@@ -6,7 +6,9 @@ on: | |||
tags: | |||
- "*" | |||
pull_request: | |||
|
|||
schedule: # Scheduled nightly and weekly jobs |
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.
Will this schedule also deploy the job? Either we should skip the deployment or create a new workflow with just the Cypress tests running.
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.
@hussainweb Creating a new separate workflow with just Cypress tests is a good idea since the above triggers all the ci.yml workflow.
export default defineConfig({ | ||
projectId: 'contrib-tracker', | ||
chromeWebSecurity: false, // To Bypass Same-Origin Policy - Useful for social-media-link-check test | ||
video: process.env.CYPRESS_VIDEO !== 'false', // Defaults to true unless explicitly set to 'false' | ||
e2e: { | ||
baseUrl: process.env.CYPRESS_BASE_URL || 'https://contrib.axelerant.com', // Default to prod url if no base URL is set | ||
env: { | ||
grepTags: 'expensive' |
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.
What does this line do? From my limited knowledge, it seems it will assign all tests this tag which seems incorrect. Please clarify.
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.
@hussainweb This line sets a default value for grepTags as expensive in the Cypress environment. This means, unless overridden, Cypress will only run tests that have been specifically tagged - expensive.
"cypress-open": "cypress open --env version=prod --browser chrome", | ||
"cypress-run": "cypress run --env version=prod --browser chrome", | ||
"cypress:run:without-video": "CYPRESS_VIDEO=false cypress run --env version=prod", | ||
"test:smoke": "cypress run --env grepTags=smoke", | ||
"test:regression": "cypress run --env grepTags=regression", | ||
"test:expensive": "cypress run --env grepTags=expensive" |
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.
Let's have a consistent syntax to run the tests. This is too confusing: some with hyphen, some with a different prefix...
"cypress-run": "cypress run --browser chrome", | ||
"cypress:run:without-video": "CYPRESS_VIDEO=false cypress run" | ||
"cypress-open": "cypress open --env version=prod --browser chrome", | ||
"cypress-run": "cypress run --env version=prod --browser chrome", |
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.
Didn't we get rid of version=prod
previously? @zeshanziya, do you remember?
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.
@hussainweb Yes, we removed this. I kind of remember the same.
For this to function, we need to have tagged test scripts.