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

test: fix example-recording failure reporting status #1073

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

MikeMcC399
Copy link
Collaborator

@MikeMcC399 MikeMcC399 commented Nov 5, 2023

Changes

This PR corrects an issue where the example-recording.yml workflow passes back a success status to GitHub in the parallel job whether or not the Cypress tests from the project examples/recording pass or fail.

The code example in README > Outputs is also corrected.

Verification

  1. Modify examples/recording/cypress/e2e/spec-a.cy.js to introduce a deliberate failure condition by adding the following to the test spec:
assert.fail('This is a deliberate error')
  1. Manually trigger a run of workflows/example-recording.yml by clicking on "Run workflow".

  2. After the workflow run has completed, examine the logs and confirm that one of the jobs parallel (1) or parallel (2) is marked with a red cross to indicate failure.

  3. Confirm that the step "Print Cypress Cloud URL" was executed for both parallel (1) and parallel (2), and that it reports the correct status of either "failure" or "success". One job should succeed, the other should fail.

  4. Revert the deliberate error and push the correction as a new commit to the repo.

  5. Run the workflow again via "Run workflow". (Don't use "Re-run jobs" as this will run against the original commit, not the corrected one.)

  6. Confirm that all jobs pass, that the step "Print Cypress Cloud URL" was executed in the parallel jobs and that it reports "success".

@MikeMcC399 MikeMcC399 self-assigned this Nov 5, 2023
@cypress-app-bot
Copy link

@MikeMcC399 MikeMcC399 removed their assignment Nov 5, 2023
@MikeMcC399 MikeMcC399 marked this pull request as ready for review November 5, 2023 11:31
@MikeMcC399 MikeMcC399 added the bug Something isn't working label Nov 5, 2023
@MikeMcC399 MikeMcC399 marked this pull request as draft November 5, 2023 17:20
@MikeMcC399 MikeMcC399 marked this pull request as ready for review November 5, 2023 17:25
@MikeMcC399
Copy link
Collaborator Author

This PR is not logged to the Triage board

@MikeMcC399
Copy link
Collaborator Author

@jennifer-shehane

Since you added me as an "outside collaborator" in this repo, my issues and PRs are not added to the Triage board anymore.

Could you please review and merge this PR?

The PR corrects a long-standing bug which I recently noticed.

@jennifer-shehane
Copy link
Member

@MikeMcC399 Hmm, true. I'll have to look into that.

@jennifer-shehane jennifer-shehane merged commit e3d39f5 into cypress-io:master Nov 20, 2023
68 checks passed
@MikeMcC399 MikeMcC399 deleted the recording-status branch November 20, 2023 23:10
Copy link

🎉 This PR is included in version 6.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

example-recording reports wrong status if parallel job fails
3 participants