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

PR Title 😎 #37

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/currents.yml → .github/currents.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Cypress Tests

on:
push:
pull_request:

jobs:
cypress-tests:
Expand All @@ -23,13 +23,20 @@ jobs:
with:
node-version: 16

- name: Print Event Payload
run: |
cat $GITHUB_EVENT_PATH

- name: Print Env variables
run: |
printenv

# Install Currents
- name: Install dependencies
run: |
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
Expand All @@ -52,7 +59,7 @@ jobs:
# 🔥 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}}"
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
73 changes: 73 additions & 0 deletions .github/workflows/currents-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Cypress Tests Staging

on:
pull_request:

jobs:
cypress-tests:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
# run 3 copies of the current job in parallel
containers: [1, 2, 3]
steps:
- name: Checkout
uses: actions/checkout@v3
# populate commit message for merge commits
# see https://currents.dev/readme/ci-setup/github-actions
# with:
# ref: ${{ github.event.pull_request.head.sha }}

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

- name: Print Event Payload
run: |
cat $GITHUB_EVENT_PATH

- name: Print Env variables
run: |
printenv

# Install Currents
- name: Install dependencies
run: |
npx ci

- name: Unblock Cypress
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

- name: Run Cypress on Currents.dev
env:
# enable verbose logging
DEBUG: \@cypress/github-action
CURRENTS_ENFORCE_IS_CURRENTS: 1
CURRENTS_PROJECT_ID: 9aOuF6
CURRENTS_API_URL: https://cy-staging.currents.dev
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_STAGING }} --ci-build-id ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}

- name: Cancel the run if workflow is cancelled
if: ${{ cancelled() }}
uses: currents-dev/cancel-run-gh-action@v1
with:
api-token: ${{ secrets.CURRENTS_API_KEY_STAGING }}
github-run-id: ${{ github.run_id }}
github-run-attempt: ${{ github.run_attempt }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ yarn-debug.log*
yarn-error.log*
lerna-debug.log*

cypress-traces
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

Expand Down
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { cloudPlugin } from "cypress-cloud/plugin";

export default defineConfig({
e2e: {
baseUrl: "https://todomvc.com/examples/vanillajs",
baseUrl: "https://todomvc.com/examples/backbone/dist",
specPattern: "cypress/e2e/*.spec.js",
supportFile: "cypress/support/e2e.ts",
setupNodeEvents: (on, config) => {
Expand Down
Loading
Loading