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

Save or Prevent recordings and screenshots in Github Action? #380

Closed
mesqueeb opened this issue May 26, 2021 · 3 comments
Closed

Save or Prevent recordings and screenshots in Github Action? #380

mesqueeb opened this issue May 26, 2021 · 3 comments

Comments

@mesqueeb
Copy link

I have set up a Github action that runs my tests.
It seems to also creates recordings and screenshots, on the ubuntu instance, but obviously I can't access them now.

I know it's possible to link to the Cypress console, but I was wondering two things:

  1. Is there any way to commit the recordings to the same branch and delete them again if all tests pass?
  2. Is there any way to just prevent screenshots and recordings to be made to make the tests complete faster?
@davidlinse
Copy link

regarding the 2nd point, have a look at the configuration options of the action to disable screenshots and videos.

regards
~david

@ricardo-dematos
Copy link

  1. Is there any way to commit the recordings to the same branch and delete them again if all tests pass?

You can achieve it by adding extra steps to your workflow. Something like this:

      - name: 'Run cypress'
        id: cypress
        uses: cypress-io/github-action@v5  # see https://github.com/cypress-io/github-action/issues/620

      - name: 'Upload screenshots'
        id: cypress-screenshots
        if: ${{ (success() || failure()) && (steps.cypress.outcome == 'failure') }}
        uses: actions/upload-artifact@v3
        with:
          name: 'cypress-screenshots'
          path: 'cypress/screenshots'
          if-no-files-found: ignore
  1. Is there any way to just prevent screenshots and recordings to be made to make the tests complete faster?

See screenshotOnRunFailure and video configurations.

@nagash77
Copy link
Contributor

I am going to close this issue as it is quite old at this point. If folks are seeing this behavior in current versions of Cypress please open a new ticket with a reproducible example and we will be happy to investigate.

@nagash77 nagash77 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2023
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

No branches or pull requests

4 participants