Cypress E2E Testing of Deployed React Adobe Embed Component as a Heartbeat Canary #22307
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cypress E2E Testing of Deployed React Adobe Embed Component as a Heartbeat Canary | |
| on: | |
| repository_dispatch: | |
| types: [react_adobe_embed_code_pushed] | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: '*/12 13-23 * * *' | |
| - cron: '*/12 0-5 * * *' | |
| jobs: | |
| install: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: cypress/browsers:latest | |
| options: --user 1001 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Cache Cypress Binary | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/Cypress | |
| key: cypress-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| cypress-${{ runner.os }}- | |
| - name: Cache npm Dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.npm | |
| key: npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| npm-${{ runner.os }}- | |
| - name: Install Dependencies | |
| run: npm ci && npx cypress install | |
| cypress-runner: | |
| name: Run Cypress Tests | |
| runs-on: ubuntu-latest | |
| container: | |
| image: cypress/browsers:latest | |
| options: --user 1001 | |
| needs: install | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Run Cypress Tests | |
| uses: cypress-io/[email protected] | |
| with: | |
| install: true | |
| record: false | |
| browser: chrome | |
| runTests: true | |
| env: | |
| CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} |