Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
agoldis committed Nov 17, 2023
1 parent 4a96171 commit ac0a820
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/currents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,33 @@ jobs:
# Install Currents
- name: Install dependencies
run: |
yarn install --frozen-lockfile
npx ci
- name: Unblock Cypress
# working-directory: "services/rails"
run: |
echo 🕊️ Download Free Cypress
CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev npx cypress install --force
echo 🕊️ Verify Cypress
echo Verify Cypress
npx cypress verify
echo 👀 Cypress Cache
yarn cypress cache list
yarn cypress cache path
echo 👀 Cypress SHA
file `npx cypress cache path`/12.17.4/Cypress/Cypress
npx cypress cache list
npx cypress cache path
- 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: |
yarn cypress-cloud --record --parallel --browser chrome --key ${{ secrets.CURRENTS_RECORD_KEY }} --ci-build-id "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}"
npx cypress-cloud --record --parallel --browser chrome --key ${{ secrets.CURRENTS_RECORD_KEY }} --ci-build-id "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}"
- name: Cancel the run if workflow is cancelled
if: ${{ cancelled() }}
Expand Down
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The example [workflow config file](/~https://github.com/currents-dev/gh-actions-ex

- runs 3 containers with cypress tests in parallel

- install block-free Cypress binaries

- uses [Custom Test Command](/~https://github.com/cypress-io/github-action#custom-test-command) to run `cypress-cloud` for recording test results and parallelization with [Currents.dev](https://currents.dev)

- Note: get your record key from [Currents.dev](https://app.currents.dev) and set [GH secret](https://docs.github.com/en/actions/reference/encrypted-secrets) variable `CURRENTS_RECORD_KEY`
Expand All @@ -16,5 +18,27 @@ The example [workflow config file](/~https://github.com/currents-dev/gh-actions-ex

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


https://user-images.githubusercontent.com/1637928/227701237-db4d7a7f-b26b-46ac-ba6a-3806ede37671.mp4

## Using Alternative Cypress Binaries

Following [aggressive blocking](/~https://github.com/cypress-io/cypress/issues/28269) 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](/~https://github.com/cypress-io/github-action). `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:

```yml
- 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}}"
```

0 comments on commit ac0a820

Please sign in to comment.