Cypress Tests Stage #19243
This file contains 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 Tests Stage | |
on: | |
# allows the manual trigger | |
workflow_dispatch: | |
schedule: | |
- cron: '*/15 * * * *' # Run every 20 minutes | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Install NPM dependencies, cache them correctly | |
# and run all Cypress tests | |
- name: Cypress run | |
uses: cypress-io/github-action@v6 | |
env: | |
TRACETEST_API_TOKEN: ${{secrets.TRACETEST_TOKEN_STAGE}} | |
POKESHOP_DEMO_URL: ${{secrets.POKESHOP_DEMO_URL_STAGE}} | |
TRACETEST_SERVER_URL: https://app-stage.tracetest.io | |
- name: Send message on Slack in case of failure | |
if: ${{ failure() }} | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"text": ":warning: Synthetic Monitoring failed for *Cypress e2e with Pokeshop* on *stage*. <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow>" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SYNTETIC_MONITORING_SLACK_WEBHOOK_URL_STAGE }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |