Skip to content

Commit

Permalink
Merge pull request #32 from currents-dev/padlet-example
Browse files Browse the repository at this point in the history
Padlet example
  • Loading branch information
agoldis authored Nov 17, 2023
2 parents 48971ad + ac0a820 commit 68c9fee
Show file tree
Hide file tree
Showing 5 changed files with 1,863 additions and 6,687 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/currents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,38 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 16

# Install Currents
- name: Install dependencies
run: |
npm ci
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
npx cypress verify
echo 👀 Cypress Cache
npx cypress cache list
npx cypress cache path
# Run all Cypress tests
- name: Run Cypress on Currents.dev
uses: cypress-io/github-action@v6
env:
CYPRESS_DOWNLOAD_MIRROR: https://cy-cdn.currents.dev
# 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: |
npm run currents:custom -- --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}}"
```
Loading

0 comments on commit 68c9fee

Please sign in to comment.