Skip to content

Nightly E2E Tests

Nightly E2E Tests #152

name: Nightly E2E Tests
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: read
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
notify_e2e_start:
name: 🔔 Starting E2E Tests
runs-on: ubuntu-latest
steps:
- name: Send “E2E Tests Starting” to Slack
uses: rtCamp/action-slack-notify@cdf0a2130cbcdfd82ba5fcac8e076370bf381b36 # v2
env:
SLACK_TITLE: 'E2E Tests Starting'
MSG_MINIMAL: true
SLACK_MESSAGE: 'E2E tests have started…'
e2e:
name: 🏃‍♀️ Run E2E Tests
runs-on: ubuntu-latest
needs: notify_e2e_start
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '18'
cache: 'npm'
- name: Install base dependencies
run: npm ci
- name: Run Cypress E2E Suite
env:
TEST_ACCOUNT_PASSWORD: ${{ secrets.TEST_ACCOUNT_PASSWORD }}
run: npx cypress run --config-file cypress/cypress.e2e.config.ts
- name: Archive Cypress videos & screenshots
if: failure() || always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: cypress-e2e-artifacts
path: |
cypress/e2e/videos
cypress/e2e/screenshots
notify_e2e_end:
name: 🔔 E2E Tests Finished
runs-on: ubuntu-latest
needs: e2e
if: always()
steps:
- name: Notify E2E results to Slack
uses: rtCamp/action-slack-notify@cdf0a2130cbcdfd82ba5fcac8e076370bf381b36 # v2
env:
SLACK_COLOR: ${{ needs.e2e.result == 'success' && 'good' || 'danger' }}
SLACK_TITLE: 'E2E Tests Finished'
MSG_MINIMAL: false
SLACK_MESSAGE_ON_SUCCESS: '✅ E2E tests passed on branch `${{ github.ref_name }}`.'
SLACK_MESSAGE_ON_FAILURE: '<!here> ❌ E2E tests failed on branch `${{ github.ref_name }}`.'
SLACK_MESSAGE: 'E2E tests completed with status `${{ job.status }}`.'