From 7ab184cd52d5f83d9a5776c74f7a017f8d58b8d5 Mon Sep 17 00:00:00 2001 From: Yogesh Chaudhary Date: Wed, 15 Apr 2026 19:13:02 +0530 Subject: [PATCH] chore: replace BrowserStack with Cypress cross-browser matrix - Remove BrowserStack workflow and config - Add Cypress cross-browser matrix running Chrome, Edge, and Firefox on windows-latest - Upgrade Cypress from 13.x to 14.x to fix Firefox CDP support --- .github/workflows/browserstack.yml | 53 ----------------------- .github/workflows/cross-browser.yml | 66 +++++++++++++++++++++++++++++ browserstack.json | 36 ---------------- package.json | 3 +- 4 files changed, 67 insertions(+), 91 deletions(-) delete mode 100644 .github/workflows/browserstack.yml create mode 100644 .github/workflows/cross-browser.yml delete mode 100644 browserstack.json diff --git a/.github/workflows/browserstack.yml b/.github/workflows/browserstack.yml deleted file mode 100644 index ddbac08d..00000000 --- a/.github/workflows/browserstack.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Browserstack - -on: - merge_group: - workflow_dispatch: - pull_request: - types: - - opened - - synchronize - push: - branches: - - main - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -env: - NODE_VERSION: 22 - -jobs: - - browserstack: - - name: BrowserStack Tests - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v6 - with: - ref: ${{ github.event.pull_request.head.sha || github.ref }} - - - name: Setup Node - uses: actions/setup-node@v6 - with: - node-version: ${{ env.NODE_VERSION }} - package-manager-cache: false - - - name: Build package - uses: ./.github/actions/build - with: - node: ${{ env.NODE_VERSION }} - - - name: Run tests - shell: bash - run: npx concurrently --raw --kill-others --success first "npm:start" "wait-on http://127.0.0.1:3000/ && browserstack-cypress run --build-name ${{ github.event.pull_request.head.sha || github.ref }} --no-wrap --specs "cypress/e2e/smoke-bs.cy.ts"" - env: - BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} diff --git a/.github/workflows/cross-browser.yml b/.github/workflows/cross-browser.yml new file mode 100644 index 00000000..29948ab4 --- /dev/null +++ b/.github/workflows/cross-browser.yml @@ -0,0 +1,66 @@ +name: Cross-Browser Tests + +on: + merge_group: + workflow_dispatch: + pull_request: + types: + - opened + - synchronize + push: + branches: + - main + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +env: + NODE_VERSION: 22 + +jobs: + + cross-browser: + + name: ${{ matrix.browser }} + runs-on: ${{ matrix.os }} + timeout-minutes: 25 + + strategy: + fail-fast: false + matrix: + os: [windows-latest] + browser: [chrome, edge, firefox] + + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} + + - name: Build package + uses: ./.github/actions/build + with: + node: ${{ env.NODE_VERSION }} + + - name: Run cross-browser tests + uses: cypress-io/github-action@v6 + with: + browser: ${{ matrix.browser }} + start: npm start + wait-on: 'http://127.0.0.1:3000' + spec: cypress/e2e/smoke-bs.cy.ts + config-file: cypress-bs.config.js + install-command: npx cypress install + + - name: Upload Cypress screenshots + if: failure() + uses: actions/upload-artifact@v7 + with: + name: cypress-screenshots-${{ matrix.browser }}-${{ github.run_id }} + path: cypress/screenshots + retention-days: 30 + if-no-files-found: ignore diff --git a/browserstack.json b/browserstack.json deleted file mode 100644 index 15bf62be..00000000 --- a/browserstack.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "browsers": [ - { - "browser": "chrome", - "os": "Windows 10", - "versions": ["latest"] - }, - { - "browser": "firefox", - "os": "Windows 10", - "versions": ["latest"] - }, - { - "browser": "edge", - "os": "Windows 10", - "versions": ["latest"] - } - ], - "run_settings": { - "cypress_config_file": "./cypress-bs.config.js", - "cypress-version": "13.1", - "project_name": "Auth0 React SDK", - "exclude": [], - "parallels": "5", - "npm_dependencies": { - "typescript": "^4.6.3" - }, - "package_config_options": {}, - "headless": true - }, - "connection_settings": { - "local": true, - "local_mode": "always-on" - }, - "disable_usage_reporting": false -} diff --git a/package.json b/package.json index 547be203..8bae057e 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,7 @@ "@types/react-dom": "19.2.3", "@typescript-eslint/eslint-plugin": "^8.36.0", "@typescript-eslint/parser": "^8.36.0", - "browserstack-cypress-cli": "^1.19.1", - "cypress": "^13.1.0", + "cypress": "^14.5.4", "eslint": "^8.28.0", "eslint-plugin-react": "^7.31.11", "eslint-plugin-react-hooks": "^4.6.0",