Skip to content
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

CI: Percy Integration #467

Merged
merged 19 commits into from
May 21, 2024
Merged

CI: Percy Integration #467

merged 19 commits into from
May 21, 2024

Conversation

zeshanziya
Copy link
Contributor

No description provided.

@hussainweb
Copy link
Member

@zeshanziya, what exactly is the intent of this PR? Builds are going to Percy at the moment. What's new in this change?

I am wondering if we should leave it as-is for now and focus on caching in CI for today.

@zeshanziya
Copy link
Contributor Author

@zeshanziya, what exactly is the intent of this PR? Builds are going to Percy at the moment. What's new in this change?

I am wondering if we should leave it as-is for now and focus on caching in CI for today.

@hussainweb This PR is for Percy CI integration. There was some issue running percy using ddev. It's almost completed now. Can you please review it. last few commits were about identifying branch and commit hash for Percy. I will move focus to caching now.

@zeshanziya zeshanziya marked this pull request as ready for review May 20, 2024 09:51
@@ -0,0 +1,8 @@
#!/bin/bash
#ddev-generated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zeshanziya, is this actually ddev-generated? If it's copy/pasted, please remove this line.

@@ -0,0 +1,8 @@
#!/bin/bash
#ddev-generated
## Description: Use Cypress in "runner" mode.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this also copy/paste? I am guessing this is doing more than just running Cypress.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my bad. Yes, it's a copy-paste. I have updated the doc comment now.

.ddev/docker-compose.cypress.yaml Show resolved Hide resolved
Comment on lines 108 to 109
# - name: Cypress Test
# run: ddev cypress-run
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept it for review. so if we just want to run cypress without percy, we can use this. I will remove it from here and add it to the documentation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather remove it. If you really want to keep it, I suggest writing an actual comment before ddev percy-run explaining the alternative they can swap it with.

.github/workflows/ci.yml Show resolved Hide resolved
@@ -4,4 +4,5 @@ export default defineConfig({
e2e: {
baseUrl: 'https://contribtracker.ddev.site/',
},
video: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to explicitly say this? What about screenshots? I ask because I recall not seeing screenshots in some of the recent artifacts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only captures screenshots if a test fails. From version 13, capturing video is turned off by default, so I had to enable it.

I am trying to find out what changed in version 13 that stopped screenshots from being taken for each test. I am just curious how Cypress decides when to take a screenshot for a successful test, as a test may contain multiple actions expanding to 4 to 5 seconds or more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure either. I remember seeing the screenshots when I ran Cypress locally. But I don't think I saw it in all the artifacts I downloaded from GitHub runs.

Anyway, this is not a blocker. If the only action item is to add a property, let's do it, otherwise, ignore this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't see any attributes for capturing screenshots. We can capture screenshots manually in the code using cy.screenshot if required.
Anyway, it captures videos and screenshots in case of failure, so it serves our purpose for now.

Comment on lines 108 to 109
# - name: Cypress Test
# run: ddev cypress-run
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather remove it. If you really want to keep it, I suggest writing an actual comment before ddev percy-run explaining the alternative they can swap it with.

@@ -4,4 +4,5 @@ export default defineConfig({
e2e: {
baseUrl: 'https://contribtracker.ddev.site/',
},
video: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure either. I remember seeing the screenshots when I ran Cypress locally. But I don't think I saw it in all the artifacts I downloaded from GitHub runs.

Anyway, this is not a blocker. If the only action item is to add a property, let's do it, otherwise, ignore this.

@hussainweb hussainweb merged commit 4d78f85 into main May 21, 2024
3 checks passed
@hussainweb hussainweb deleted the percy-integration branch May 21, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants