Failed E2E Tests #2
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: Failed E2E Tests | |
on: | |
schedule: | |
- cron: '0 3 * * 1-5' # Runs at 00:00 in UTC-3 | |
workflow_dispatch: | |
jobs: | |
run-failed-e2e-tests: | |
name: Run Failed E2E Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Run Cypress E2E Tests | |
uses: cypress-io/github-action@v6 | |
env: | |
STAGE_CYPRESS_EMAIL: ${{ secrets.STAGE_CYPRESS_EMAIL }} | |
STAGE_CYPRESS_PASSWORD: ${{ secrets.STAGE_CYPRESS_PASSWORD }} | |
with: | |
browser: chrome | |
config-file: cypress.config.stage.js | |
env: environment=stage,grepTags=@xfail | |
- name: Check E2E Test Coverage | |
if: ${{ always() }} | |
run: node ./scripts/check_coverage.js ./coverage/e2e/lcov.info 20 | |
- name: Compress E2E Coverage Reports | |
if: ${{ always() }} | |
run: | | |
rm -rf coverage/e2e/lcov-report | |
zip -r coverage.zip coverage | |
- name: Upload E2E Coverage Report Artifact | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage_e2e_report | |
path: coverage.zip | |
retention-days: 7 | |
- name: Upload Cypress Screenshots Artifact | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cypress_screenshots | |
path: cypress/screenshots | |
retention-days: 4 | |
- name: Upload Cypress Videos Artifact | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cypress_videos | |
path: cypress/videos | |
retention-days: 1 |