Skip to content

This is an example repository that showcases using Cypress GitHub Actions with Currents.dev.

Notifications You must be signed in to change notification settings

currents-dev/gh-actions-example

Repository files navigation

Currents.dev - GitHub Actions Example

This is an example repository that showcases using Currents.dev for running cypress tests on GitHub Actions.

The example workflow config file:

  • runs 3 containers with cypress tests in parallel

  • install block-free Cypress binaries

  • uses Custom Test Command to run cypress-cloud for recording test results and parallelization with Currents.dev

  • Note: get your record key from Currents.dev and set GH secret variable CURRENTS_RECORD_KEY

  • Note: set the projectId in currents.config.js - obtain the project id from Currents.dev

  • Note: use CLI arguments to customize your cypress-cloud runs, e.g.: npx cypress-cloud run --parallel --record --key <your currents.dev key> --group groupA

Here's an example of how the demo workflow appears in Currents dashboard:

currents-2023-03-24-23.35.44.mp4

Using Alternative Cypress Binaries

Following aggressive blocking by Cypress.io team we released alternative, block-free Cypress binaries that were compiled from the MIT-licensed Cypress source code.

The documentation is available at: https://currents.dev/readme/integration-with-cypress/alternative-cypress-binaries.

The example in this repository uses cypress-io/github-action@v6. cypress-io/github-action caches and restores cypress binaries before running the tests - you need to disable this behaviour to use the freshly installed non-blocking binaries:

- name: Run Cypress on Currents.dev
  env:
    # enable verbose logging
    DEBUG: \@cypress/github-action
  uses: cypress-io/github-action@v6
  continue-on-error: true

  with:
    # 🔥 Set to false to prevent restoring cached blocking Cypress binary
    install: false
    command: |
      npx cypress-cloud --record --parallel --browser chrome --key ${{ secrets.CURRENTS_RECORD_KEY }} --ci-build-id "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}"

About

This is an example repository that showcases using Cypress GitHub Actions with Currents.dev.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published